1.2.0 • Published 3 years ago

@butterwell/oklab v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

oklab

Oklab color in Typescript

From Björn Ottosson, A perceptual color space for image processing

"L" is luminosity,
"a" runs from green to red
"b" runs from blue to yellow

import { toOklab, rgbString } from '@butterwell/oklab';

const gray = toOklab({ r: 153, g: 153, b: 153 });
const green = toOklab({ r: 0, g: 255, b: 0 });
const between = {
    L: (gray.L + green.L) / 2,
    a: (gray.a + green.a) / 2,
    b: (gray.b + green.b) / 2,
};
// 'rgb(122, 205, 116)'
1.2.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.11

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.1

3 years ago