PSD.JS Text layer color analysis

I use PSD.JS (PSD file parser for NodeJS and browsers) to parse multiple PSD files. When the parser extracts information for the text layer, the color information is returned as an array.

eg: colors": [ [ 102, 0, 255, 0, 255 ], [ 102, 0, 255, 0, 255 ] ]

But the array contains 5 values ​​instead of 3 for RGB or 4 for CMYK.

Please help me understand why color is represented by 5 values?

And is there a way to convert this to the equivalent of RGB?

I am sure that this is not a problem with PSD.JS, but with implementation details.

0
source share
1 answer

PSD.js mainainer here.

, js , .

:

Parse the image data. 
The resulting image data will be formatted to match the Javascript Canvas color format.
 e.g. [R, G, B, A, R, G, B, A].

, psd , , , , .

0

Source: https://habr.com/ru/post/1694058/


All Articles