mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Added formula sources
This commit is contained in:
parent
014671d8ce
commit
046f498295
1 changed files with 3 additions and 0 deletions
|
@ -45,6 +45,9 @@ function generateAB(hue: number, chroma: number): [number, number] {
|
|||
}
|
||||
|
||||
function labToRGB(l: number, a: number, b: number): [number, number, number] {
|
||||
// https://en.wikipedia.org/wiki/CIELAB_color_space#Reverse_transformation
|
||||
// https://en.wikipedia.org/wiki/SRGB#The_forward_transformation_(CIE_XYZ_to_sRGB)
|
||||
|
||||
// Convert CIELAB to CIEXYZ (D65)
|
||||
let y = (l + 16) / 116;
|
||||
const x = adjustXYZ(y + a / 500) * 0.9505;
|
||||
|
|
Loading…
Reference in a new issue