@wistia/ui 0.13.2-beta.af67f027.2cf4e13 → 0.13.2-beta.c716c332.b3402ba
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +58 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +58 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.13.2-beta.
|
|
3
|
+
* @license @wistia/ui v0.13.2-beta.c716c332.b3402ba
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9635,6 +9635,33 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
9635
9635
|
] }) });
|
|
9636
9636
|
};
|
|
9637
9637
|
|
|
9638
|
+
// src/components/ColorPicker/color-conversion-utils.ts
|
|
9639
|
+
var import_fn = require("culori/fn");
|
|
9640
|
+
(0, import_fn.useMode)(import_fn.modeRgb);
|
|
9641
|
+
(0, import_fn.useMode)(import_fn.modeHsv);
|
|
9642
|
+
var convertToHsv = (color) => {
|
|
9643
|
+
const rgb = (0, import_fn.parseHex)(color);
|
|
9644
|
+
if (rgb == null) {
|
|
9645
|
+
throw new Error(`Invalid hex color value: ${color}`);
|
|
9646
|
+
}
|
|
9647
|
+
return (0, import_fn.convertRgbToHsv)(rgb);
|
|
9648
|
+
};
|
|
9649
|
+
var convertToLrgb = (color) => {
|
|
9650
|
+
let result;
|
|
9651
|
+
if (typeof color === "string") {
|
|
9652
|
+
const rgb = (0, import_fn.parseHex)(color);
|
|
9653
|
+
if (rgb == null) {
|
|
9654
|
+
throw new Error(`Invalid hex color value: ${color}`);
|
|
9655
|
+
}
|
|
9656
|
+
result = (0, import_fn.convertRgbToLrgb)(rgb);
|
|
9657
|
+
} else {
|
|
9658
|
+
const rgb = (0, import_fn.convertHsvToRgb)(color);
|
|
9659
|
+
result = (0, import_fn.convertRgbToLrgb)(rgb);
|
|
9660
|
+
}
|
|
9661
|
+
return result;
|
|
9662
|
+
};
|
|
9663
|
+
var convertToRgb = (hsv) => (0, import_fn.convertHsvToRgb)(hsv);
|
|
9664
|
+
|
|
9638
9665
|
// src/components/ColorPicker/ColorGrid.tsx
|
|
9639
9666
|
var import_react42 = require("react");
|
|
9640
9667
|
var import_styled_components47 = __toESM(require("styled-components"));
|
|
@@ -9644,42 +9671,6 @@ var import_react_radio_group = require("@radix-ui/react-radio-group");
|
|
|
9644
9671
|
var import_react41 = require("react");
|
|
9645
9672
|
var import_fn4 = require("culori/fn");
|
|
9646
9673
|
|
|
9647
|
-
// src/components/ColorPicker/getColorConversions.ts
|
|
9648
|
-
var import_fn = require("culori/fn");
|
|
9649
|
-
var getColorConversions = (color) => {
|
|
9650
|
-
if (typeof color === "string") {
|
|
9651
|
-
const rgb2 = (0, import_fn.parseHex)(color);
|
|
9652
|
-
if (!rgb2) {
|
|
9653
|
-
return {
|
|
9654
|
-
hex: color,
|
|
9655
|
-
rgb: { r: 0, g: 0, b: 0, mode: "rgb" },
|
|
9656
|
-
hsv: { h: 0, s: 0, v: 0, mode: "hsv" },
|
|
9657
|
-
lrgb: { r: 0, g: 0, b: 0, mode: "lrgb" },
|
|
9658
|
-
isValid: false
|
|
9659
|
-
};
|
|
9660
|
-
}
|
|
9661
|
-
const hsv = (0, import_fn.convertRgbToHsv)(rgb2);
|
|
9662
|
-
const lrgb2 = (0, import_fn.convertRgbToLrgb)(rgb2);
|
|
9663
|
-
return {
|
|
9664
|
-
hex: color,
|
|
9665
|
-
rgb: rgb2,
|
|
9666
|
-
hsv,
|
|
9667
|
-
lrgb: lrgb2,
|
|
9668
|
-
isValid: true
|
|
9669
|
-
};
|
|
9670
|
-
}
|
|
9671
|
-
const rgb = (0, import_fn.convertHsvToRgb)(color);
|
|
9672
|
-
const hex = (0, import_fn.serializeHex)(rgb);
|
|
9673
|
-
const lrgb = (0, import_fn.convertRgbToLrgb)(rgb);
|
|
9674
|
-
return {
|
|
9675
|
-
hex,
|
|
9676
|
-
rgb,
|
|
9677
|
-
hsv: color,
|
|
9678
|
-
lrgb,
|
|
9679
|
-
isValid: true
|
|
9680
|
-
};
|
|
9681
|
-
};
|
|
9682
|
-
|
|
9683
9674
|
// src/components/ColorPicker/transitionBetweenColors.ts
|
|
9684
9675
|
var import_fn2 = require("culori/fn");
|
|
9685
9676
|
var transitionBetweenColors = (fromHsv, toHsv, onColorStep, onTransitionEnd) => {
|
|
@@ -9775,8 +9766,8 @@ var getAccessibleColorByValueChannelChange = ({
|
|
|
9775
9766
|
v: extremeValue,
|
|
9776
9767
|
mode: "hsv"
|
|
9777
9768
|
};
|
|
9778
|
-
const
|
|
9779
|
-
const extremeContrast = (0, import_fn3.wcagContrast)(
|
|
9769
|
+
const extremeVariantAsLrgb = convertToLrgb(extremeVariant);
|
|
9770
|
+
const extremeContrast = (0, import_fn3.wcagContrast)(extremeVariantAsLrgb, colorForComparisonAsLrgb);
|
|
9780
9771
|
if (extremeContrast < minContrast) {
|
|
9781
9772
|
return null;
|
|
9782
9773
|
}
|
|
@@ -9792,8 +9783,7 @@ var getAccessibleColorByValueChannelChange = ({
|
|
|
9792
9783
|
v: midValue,
|
|
9793
9784
|
mode: "hsv"
|
|
9794
9785
|
};
|
|
9795
|
-
const
|
|
9796
|
-
const contrast = (0, import_fn3.wcagContrast)((0, import_fn3.convertRgbToLrgb)(candidateRgb), colorForComparisonAsLrgb);
|
|
9786
|
+
const contrast = (0, import_fn3.wcagContrast)(convertToLrgb(candidateHsv), colorForComparisonAsLrgb);
|
|
9797
9787
|
if (contrast >= minContrast) {
|
|
9798
9788
|
bestSoFar = candidateHsv;
|
|
9799
9789
|
}
|
|
@@ -9865,8 +9855,7 @@ var getAccessibleColorBySaturationAndValueChange = ({
|
|
|
9865
9855
|
};
|
|
9866
9856
|
};
|
|
9867
9857
|
const checkContrast = (hsv) => {
|
|
9868
|
-
|
|
9869
|
-
return (0, import_fn3.wcagContrast)((0, import_fn3.convertRgbToLrgb)(rgb), colorForComparisonAsLrgb);
|
|
9858
|
+
return (0, import_fn3.wcagContrast)(convertToLrgb(hsv), colorForComparisonAsLrgb);
|
|
9870
9859
|
};
|
|
9871
9860
|
const extremeHsv = getHsvForStep(highStep);
|
|
9872
9861
|
if (checkContrast(extremeHsv) < minContrast) {
|
|
@@ -9924,8 +9913,7 @@ var getAccessibleColor = ({
|
|
|
9924
9913
|
minContrast = DEFAULT_MIN_CONTRAST,
|
|
9925
9914
|
maxIterations = 50
|
|
9926
9915
|
}) => {
|
|
9927
|
-
const
|
|
9928
|
-
const originalContrast = (0, import_fn3.wcagContrast)((0, import_fn3.convertRgbToLrgb)(originalRgb), colorForComparisonAsLrgb);
|
|
9916
|
+
const originalContrast = (0, import_fn3.wcagContrast)(convertToLrgb(originalHsv), colorForComparisonAsLrgb);
|
|
9929
9917
|
if (originalContrast >= minContrast) {
|
|
9930
9918
|
return originalHsv;
|
|
9931
9919
|
}
|
|
@@ -9956,8 +9944,7 @@ var hasAccessibleDerivatives = ({
|
|
|
9956
9944
|
colorForComparisonAsLrgb,
|
|
9957
9945
|
minContrast = DEFAULT_MIN_CONTRAST
|
|
9958
9946
|
}) => {
|
|
9959
|
-
const
|
|
9960
|
-
const originalContrast = (0, import_fn3.wcagContrast)((0, import_fn3.convertRgbToLrgb)(originalRgb), colorForComparisonAsLrgb);
|
|
9947
|
+
const originalContrast = (0, import_fn3.wcagContrast)(convertToLrgb(originalHsv), colorForComparisonAsLrgb);
|
|
9961
9948
|
if (originalContrast >= minContrast) {
|
|
9962
9949
|
return true;
|
|
9963
9950
|
}
|
|
@@ -9984,8 +9971,8 @@ var createInitialState = ({
|
|
|
9984
9971
|
colorForComparisonAsHex,
|
|
9985
9972
|
minimumContrastRatio
|
|
9986
9973
|
}) => {
|
|
9987
|
-
const
|
|
9988
|
-
const
|
|
9974
|
+
const valueAsHsv = convertToHsv(valueAsHex);
|
|
9975
|
+
const colorForComparisonAsLrgb = convertToLrgb(colorForComparisonAsHex);
|
|
9989
9976
|
return {
|
|
9990
9977
|
nonDerivedValueAsHsv: valueAsHsv,
|
|
9991
9978
|
nonDerivedValueAsHex: valueAsHex,
|
|
@@ -10059,18 +10046,11 @@ var ColorPickerProvider = ({
|
|
|
10059
10046
|
minimumContrastRatio
|
|
10060
10047
|
})
|
|
10061
10048
|
);
|
|
10062
|
-
const
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
const { lrgb: colorForComparisonAsLrgb, isValid: colorForComparisonIsValid } = getColorConversions(colorForComparisonAsHex);
|
|
10068
|
-
if (!valueIsValid) {
|
|
10069
|
-
throw new Error(`Invalid color value: ${JSON.stringify(state.valueAsHsv)}`);
|
|
10070
|
-
}
|
|
10071
|
-
if (!colorForComparisonIsValid) {
|
|
10072
|
-
throw new Error(`Invalid comparison color value: ${colorForComparisonAsHex}`);
|
|
10073
|
-
}
|
|
10049
|
+
const valueAsLrgb = (0, import_react41.useMemo)(() => convertToLrgb(state.valueAsHsv), [state.valueAsHsv]);
|
|
10050
|
+
const colorForComparisonAsLrgb = (0, import_react41.useMemo)(
|
|
10051
|
+
() => convertToLrgb(colorForComparisonAsHex),
|
|
10052
|
+
[colorForComparisonAsHex]
|
|
10053
|
+
);
|
|
10074
10054
|
const currentContrastRatio = (0, import_react41.useMemo)(() => {
|
|
10075
10055
|
return (0, import_fn4.wcagContrast)(valueAsLrgb, colorForComparisonAsLrgb);
|
|
10076
10056
|
}, [valueAsLrgb, colorForComparisonAsLrgb]);
|
|
@@ -10092,7 +10072,7 @@ var ColorPickerProvider = ({
|
|
|
10092
10072
|
const onValueAsHsvChange = (0, import_react41.useCallback)(
|
|
10093
10073
|
(rawNewValueAsHsv) => {
|
|
10094
10074
|
const hsvToSet = state.shouldEnforceMinContrast ? getAccessibleDerivativeColor(rawNewValueAsHsv) : rawNewValueAsHsv;
|
|
10095
|
-
const hexToSet =
|
|
10075
|
+
const hexToSet = (0, import_fn4.formatHex)(hsvToSet);
|
|
10096
10076
|
onValueChange(hexToSet);
|
|
10097
10077
|
dispatch({
|
|
10098
10078
|
type: "SET_VALUE_AS_HSV",
|
|
@@ -10108,7 +10088,7 @@ var ColorPickerProvider = ({
|
|
|
10108
10088
|
state.valueAsHsv,
|
|
10109
10089
|
toHsv,
|
|
10110
10090
|
(colorForStepAsHsv) => {
|
|
10111
|
-
const hexValue =
|
|
10091
|
+
const hexValue = (0, import_fn4.formatHex)(colorForStepAsHsv);
|
|
10112
10092
|
onValueChange(hexValue);
|
|
10113
10093
|
dispatch({ type: "SET_VALUE_AS_HSV", payload: { valueAsHsv: colorForStepAsHsv } });
|
|
10114
10094
|
},
|
|
@@ -10139,10 +10119,7 @@ var ColorPickerProvider = ({
|
|
|
10139
10119
|
if (valueAsHex === (0, import_fn4.formatHex)(state.valueAsHsv)) {
|
|
10140
10120
|
return;
|
|
10141
10121
|
}
|
|
10142
|
-
const
|
|
10143
|
-
if (!isNewValueValid) {
|
|
10144
|
-
throw new Error(`Invalid color value: ${valueAsHex}`);
|
|
10145
|
-
}
|
|
10122
|
+
const newValueAsHsv = convertToHsv(valueAsHex);
|
|
10146
10123
|
dispatch({
|
|
10147
10124
|
type: "SET_VALUE_AS_HSV",
|
|
10148
10125
|
payload: { valueAsHsv: newValueAsHsv }
|
|
@@ -10151,7 +10128,6 @@ var ColorPickerProvider = ({
|
|
|
10151
10128
|
const contextValue = (0, import_react41.useMemo)(
|
|
10152
10129
|
() => ({
|
|
10153
10130
|
...state,
|
|
10154
|
-
valueAsRgb,
|
|
10155
10131
|
valueAsLrgb,
|
|
10156
10132
|
currentContrastRatio,
|
|
10157
10133
|
hasAccessibleDerivatives: hasAccessibleDerivativesValue,
|
|
@@ -10164,7 +10140,6 @@ var ColorPickerProvider = ({
|
|
|
10164
10140
|
}),
|
|
10165
10141
|
[
|
|
10166
10142
|
state,
|
|
10167
|
-
valueAsRgb,
|
|
10168
10143
|
valueAsLrgb,
|
|
10169
10144
|
currentContrastRatio,
|
|
10170
10145
|
hasAccessibleDerivativesValue,
|
|
@@ -10200,13 +10175,7 @@ var ColorGrid = ({ children }) => {
|
|
|
10200
10175
|
const { valueAsHex, onValueAsHsvChange } = useColorPickerState();
|
|
10201
10176
|
const onValueChange = (0, import_react42.useCallback)(
|
|
10202
10177
|
(value) => {
|
|
10203
|
-
|
|
10204
|
-
return;
|
|
10205
|
-
}
|
|
10206
|
-
const { isValid, hsv } = getColorConversions(value);
|
|
10207
|
-
if (!isValid) {
|
|
10208
|
-
throw new Error(`Invalid color value: ${value}`);
|
|
10209
|
-
}
|
|
10178
|
+
const hsv = convertToHsv(value);
|
|
10210
10179
|
onValueAsHsvChange(hsv);
|
|
10211
10180
|
},
|
|
10212
10181
|
[onValueAsHsvChange]
|
|
@@ -10500,10 +10469,7 @@ var ColorList = ({ children }) => {
|
|
|
10500
10469
|
if (value === "") {
|
|
10501
10470
|
return;
|
|
10502
10471
|
}
|
|
10503
|
-
const
|
|
10504
|
-
if (!isValid) {
|
|
10505
|
-
throw new Error(`Invalid color value: ${value}`);
|
|
10506
|
-
}
|
|
10472
|
+
const hsv = convertToHsv(value);
|
|
10507
10473
|
onValueAsHsvChange(hsv);
|
|
10508
10474
|
},
|
|
10509
10475
|
[onValueAsHsvChange]
|
|
@@ -10644,10 +10610,7 @@ var ColorListOption = ({ value, name }) => {
|
|
|
10644
10610
|
|
|
10645
10611
|
// src/components/ColorPicker/ColorPicker.tsx
|
|
10646
10612
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
10647
|
-
var import_fn5 = require("culori/fn");
|
|
10648
10613
|
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
10649
|
-
(0, import_fn5.useMode)(import_fn5.modeRgb);
|
|
10650
|
-
(0, import_fn5.useMode)(import_fn5.modeHsv);
|
|
10651
10614
|
var ColorPicker = ({
|
|
10652
10615
|
value,
|
|
10653
10616
|
onValueChange,
|
|
@@ -11051,7 +11014,7 @@ var ContrastControls = () => {
|
|
|
11051
11014
|
|
|
11052
11015
|
// src/components/ColorPicker/HexColorInput.tsx
|
|
11053
11016
|
var import_react48 = require("react");
|
|
11054
|
-
var
|
|
11017
|
+
var import_fn5 = require("culori/fn");
|
|
11055
11018
|
|
|
11056
11019
|
// src/components/Input/Input.tsx
|
|
11057
11020
|
var import_react47 = require("react");
|
|
@@ -11284,14 +11247,14 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11284
11247
|
(event) => {
|
|
11285
11248
|
const newValue = (event.target.value || "#").trim().toLocaleLowerCase();
|
|
11286
11249
|
setTextInputValue(newValue);
|
|
11287
|
-
const isValidHexValue = Boolean((0,
|
|
11250
|
+
const isValidHexValue = Boolean((0, import_fn5.parseHex)(newValue));
|
|
11288
11251
|
if (!isValidHexValue) {
|
|
11289
11252
|
return;
|
|
11290
11253
|
}
|
|
11291
11254
|
if (newValue.length < SIX_DIGIT_HEX_CODE_LENGTH) {
|
|
11292
11255
|
return;
|
|
11293
11256
|
}
|
|
11294
|
-
const newValueAsHsv =
|
|
11257
|
+
const newValueAsHsv = convertToHsv(newValue);
|
|
11295
11258
|
onValueAsHsvChange(newValueAsHsv);
|
|
11296
11259
|
},
|
|
11297
11260
|
[onValueAsHsvChange]
|
|
@@ -11332,7 +11295,7 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11332
11295
|
}
|
|
11333
11296
|
if (key === "ArrowUp" || key === "ArrowDown") {
|
|
11334
11297
|
event.preventDefault();
|
|
11335
|
-
const
|
|
11298
|
+
const currentHsv = convertToHsv(valueAsHex);
|
|
11336
11299
|
const saturationNudge = 0.02;
|
|
11337
11300
|
const newSaturation = Math.max(
|
|
11338
11301
|
0,
|
|
@@ -11366,12 +11329,12 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11366
11329
|
event.preventDefault();
|
|
11367
11330
|
const pastedText = event.clipboardData.getData("text");
|
|
11368
11331
|
const normalizedValue = normalizeHexInput(pastedText);
|
|
11369
|
-
const isValidHexValue = Boolean((0,
|
|
11332
|
+
const isValidHexValue = Boolean((0, import_fn5.parseHex)(normalizedValue));
|
|
11370
11333
|
setTextInputValue(normalizedValue);
|
|
11371
11334
|
if (!isValidHexValue) {
|
|
11372
11335
|
return;
|
|
11373
11336
|
}
|
|
11374
|
-
const newValueAsHsv =
|
|
11337
|
+
const newValueAsHsv = convertToHsv(normalizedValue);
|
|
11375
11338
|
onValueAsHsvChange(newValueAsHsv);
|
|
11376
11339
|
},
|
|
11377
11340
|
[onValueAsHsvChange]
|
|
@@ -11428,12 +11391,12 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11428
11391
|
var import_react50 = require("react");
|
|
11429
11392
|
var import_react_slider = require("@radix-ui/react-slider");
|
|
11430
11393
|
var import_styled_components62 = __toESM(require("styled-components"));
|
|
11431
|
-
var
|
|
11394
|
+
var import_fn7 = require("culori/fn");
|
|
11432
11395
|
|
|
11433
11396
|
// src/components/ColorPicker/HSVHueCanvas.tsx
|
|
11434
11397
|
var import_react49 = require("react");
|
|
11435
11398
|
var import_styled_components61 = __toESM(require("styled-components"));
|
|
11436
|
-
var
|
|
11399
|
+
var import_fn6 = require("culori/fn");
|
|
11437
11400
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
11438
11401
|
var Canvas = import_styled_components61.default.canvas`
|
|
11439
11402
|
display: block;
|
|
@@ -11455,7 +11418,7 @@ var HSVHueCanvas = ({ hsv }) => {
|
|
|
11455
11418
|
const gradient = ctx.createLinearGradient(0, 0, width, 0);
|
|
11456
11419
|
for (let i = 0; i <= THREE_SIXTY; i++) {
|
|
11457
11420
|
const hue = i;
|
|
11458
|
-
const hexColor = (0,
|
|
11421
|
+
const hexColor = (0, import_fn6.formatHex)({ h: hue, s: hsv.s, v: hsv.v, mode: "hsv" });
|
|
11459
11422
|
if (hexColor) {
|
|
11460
11423
|
gradient.addColorStop(i / THREE_SIXTY, hexColor);
|
|
11461
11424
|
}
|
|
@@ -11518,7 +11481,7 @@ var HueSlider = () => {
|
|
|
11518
11481
|
const { nonDerivedValueAsHsv, onValueAsHsvChange, valueAsHsv } = useColorPickerState();
|
|
11519
11482
|
const containerStyle = (0, import_react50.useMemo)(() => {
|
|
11520
11483
|
return {
|
|
11521
|
-
backgroundColor: (0,
|
|
11484
|
+
backgroundColor: (0, import_fn7.formatHex)({
|
|
11522
11485
|
h: 0,
|
|
11523
11486
|
// red
|
|
11524
11487
|
s: valueAsHsv.s,
|
|
@@ -11528,7 +11491,7 @@ var HueSlider = () => {
|
|
|
11528
11491
|
};
|
|
11529
11492
|
}, [valueAsHsv.s, valueAsHsv.v]);
|
|
11530
11493
|
const thumbInnerStyle = (0, import_react50.useMemo)(() => {
|
|
11531
|
-
return { backgroundColor: (0,
|
|
11494
|
+
return { backgroundColor: (0, import_fn7.formatHex)(valueAsHsv) };
|
|
11532
11495
|
}, [valueAsHsv]);
|
|
11533
11496
|
const onHueChange = (0, import_react50.useCallback)(
|
|
11534
11497
|
(values) => {
|
|
@@ -11567,7 +11530,6 @@ var import_styled_components64 = __toESM(require("styled-components"));
|
|
|
11567
11530
|
// src/components/ColorPicker/HSVSaturationValueCanvas.tsx
|
|
11568
11531
|
var import_react51 = require("react");
|
|
11569
11532
|
var import_styled_components63 = __toESM(require("styled-components"));
|
|
11570
|
-
var import_fn9 = require("culori/fn");
|
|
11571
11533
|
|
|
11572
11534
|
// src/components/ColorPicker/canvas-utils.ts
|
|
11573
11535
|
var drawSmoothCurve = (context, points) => {
|
|
@@ -11636,7 +11598,7 @@ var drawGradientBackground = (ctx, width, height, hue) => {
|
|
|
11636
11598
|
const v = 1 - y / (height - 1);
|
|
11637
11599
|
for (let x = 0; x < width; x++) {
|
|
11638
11600
|
const s = x / (width - 1);
|
|
11639
|
-
const rgb = (
|
|
11601
|
+
const rgb = convertToRgb({ h: hue, s, v, mode: "hsv" });
|
|
11640
11602
|
const idx = 4 * (y * width + x);
|
|
11641
11603
|
data[idx] = rgb.r * TWO_FIFTY_FIVE;
|
|
11642
11604
|
data[idx + 1] = rgb.g * TWO_FIFTY_FIVE;
|