This commit is contained in:
Brooke Vibber 2023-03-24 00:30:25 -07:00
parent fe6314e2a0
commit 325102021b

View file

@ -13,7 +13,6 @@ function zeroes(n) {
return arr;
}
/*
function toLinear(val) {
// use a 2.4 gamma approximation
// this is BT.1886 compatible
@ -28,7 +27,6 @@ function fromLinear(val) {
unit **= (1 / 2.4);
return unit * 255;
}
*/
function fromSRGB(val) {
val /= 255;
@ -78,15 +76,13 @@ class RGB {
);
}
/*
toLinear() {
fromNTSC() {
return this.map(toLinear);
}
fromLinear() {
toNTSC() {
return this.map(fromLinear);
}
*/
fromSRGB() {
return this.map(fromSRGB);
@ -429,7 +425,7 @@ let atariRGB = [
0xf6e46f,
0xfffa84,
0xffff99,
].map((hex) => RGB.fromHex(hex).fromSRGB());
].map((hex) => RGB.fromHex(hex).fromNTSC());
//].map((hex) => RGB.fromHex(hex));
/**