jit.lcd color message problem

bluelemur's icon

hello everyone,

maybe it's a stupid question, but I wanted to have clarifications about the jit.lcd color message. In the description it says "set the current pen color to the value specified by the color index argument". I don't understand which colors it refers to since you can't put more than one value and can't put 3 values like an RGB or similar. Does it refer to a color palette? If so, how to see it and change it?

Thanks, happy patching

Source Audio's icon

documentation is missleading.

At least in Max 8.

jit.lcd has no color-index argument.

Max has fixed color palettes and dynamic - that live palette.

none of them are used in that color message.

whatever that color message relates to, it contains 256 colors,

starting with zero = white and ending with black = 255.

here for testing :

Max Patch
Copy patch and select New From Clipboard in Max.

bluelemur's icon

Thank you very much for your reply, I saw that the colors were defined by a single number, however I don't understand the numerical criterion, does it follow a standard criterion?

bluelemur's icon

here I have displayed all 255 colors

COLORI_jitLCD.maxpat
Max Patch

TFL's icon

Thanks for decyphering this color message!

@Bluelemur, in case you didn't notice, [jit.lcd] accepts frgb and brgb messages to define foreground and background color with RGB values.

Joshua Kit Clayton's icon

This is legacy 8bit color, and specifically the legacy 8bit color palette used by the LCD object and apple's QuickDraw API. In general, while we translate the LCD object to use mgraphics under the hood since Max 5, you may with to simply use jit.mgraphics which is more powerful than jit.lcd.

For the curious, here's the lookup table in RGBA floating point colors:

static t_jrgba old_lcd_colors[256] = { { 1.000, 1.000, 1.000, 1.000 }, { 1.000, 1.000, 0.800, 1.000 }, { 1.000, 1.000, 0.600, 1.000 }, { 1.000, 1.000, 0.400, 1.000 }, { 1.000, 1.000, 0.200, 1.000 }, { 1.000, 1.000, 0.000, 1.000 }, { 1.000, 0.800, 1.000, 1.000 }, { 1.000, 0.800, 0.800, 1.000 }, { 1.000, 0.800, 0.600, 1.000 }, { 1.000, 0.800, 0.400, 1.000 }, { 1.000, 0.800, 0.200, 1.000 }, { 1.000, 0.800, 0.000, 1.000 }, { 1.000, 0.600, 1.000, 1.000 }, { 1.000, 0.600, 0.800, 1.000 }, { 1.000, 0.600, 0.600, 1.000 }, { 1.000, 0.600, 0.400, 1.000 }, { 1.000, 0.600, 0.200, 1.000 }, { 1.000, 0.600, 0.000, 1.000 }, { 1.000, 0.400, 1.000, 1.000 }, { 1.000, 0.400, 0.800, 1.000 }, { 1.000, 0.400, 0.600, 1.000 }, { 1.000, 0.400, 0.400, 1.000 }, { 1.000, 0.400, 0.200, 1.000 }, { 1.000, 0.400, 0.000, 1.000 }, { 1.000, 0.200, 1.000, 1.000 }, { 1.000, 0.200, 0.800, 1.000 }, { 1.000, 0.200, 0.600, 1.000 }, { 1.000, 0.200, 0.400, 1.000 }, { 1.000, 0.200, 0.200, 1.000 }, { 1.000, 0.200, 0.000, 1.000 }, { 1.000, 0.000, 1.000, 1.000 }, { 1.000, 0.000, 0.800, 1.000 }, { 1.000, 0.000, 0.600, 1.000 }, { 1.000, 0.000, 0.400, 1.000 }, { 1.000, 0.000, 0.200, 1.000 }, { 1.000, 0.000, 0.000, 1.000 }, { 0.800, 1.000, 1.000, 1.000 }, { 0.800, 1.000, 0.800, 1.000 }, { 0.800, 1.000, 0.600, 1.000 }, { 0.800, 1.000, 0.400, 1.000 }, { 0.800, 1.000, 0.200, 1.000 }, { 0.800, 1.000, 0.000, 1.000 }, { 0.800, 0.800, 1.000, 1.000 }, { 0.800, 0.800, 0.800, 1.000 }, { 0.800, 0.800, 0.600, 1.000 }, { 0.800, 0.800, 0.400, 1.000 }, { 0.800, 0.800, 0.200, 1.000 }, { 0.800, 0.800, 0.000, 1.000 }, { 0.800, 0.600, 1.000, 1.000 }, { 0.800, 0.600, 0.800, 1.000 }, { 0.800, 0.600, 0.600, 1.000 }, { 0.800, 0.600, 0.400, 1.000 }, { 0.800, 0.600, 0.200, 1.000 }, { 0.800, 0.600, 0.000, 1.000 }, { 0.800, 0.400, 1.000, 1.000 }, { 0.800, 0.400, 0.800, 1.000 }, { 0.800, 0.400, 0.600, 1.000 }, { 0.800, 0.400, 0.400, 1.000 }, { 0.800, 0.400, 0.200, 1.000 }, { 0.800, 0.400, 0.000, 1.000 }, { 0.800, 0.200, 1.000, 1.000 }, { 0.800, 0.200, 0.800, 1.000 }, { 0.800, 0.200, 0.600, 1.000 }, { 0.800, 0.200, 0.400, 1.000 }, { 0.800, 0.200, 0.200, 1.000 }, { 0.800, 0.200, 0.000, 1.000 }, { 0.800, 0.000, 1.000, 1.000 }, { 0.800, 0.000, 0.800, 1.000 }, { 0.800, 0.000, 0.600, 1.000 }, { 0.800, 0.000, 0.400, 1.000 }, { 0.800, 0.000, 0.200, 1.000 }, { 0.800, 0.000, 0.000, 1.000 }, { 0.600, 1.000, 1.000, 1.000 }, { 0.600, 1.000, 0.800, 1.000 }, { 0.600, 1.000, 0.600, 1.000 }, { 0.600, 1.000, 0.400, 1.000 }, { 0.600, 1.000, 0.200, 1.000 }, { 0.600, 1.000, 0.000, 1.000 }, { 0.600, 0.800, 1.000, 1.000 }, { 0.600, 0.800, 0.800, 1.000 }, { 0.600, 0.800, 0.600, 1.000 }, { 0.600, 0.800, 0.400, 1.000 }, { 0.600, 0.800, 0.200, 1.000 }, { 0.600, 0.800, 0.000, 1.000 }, { 0.600, 0.600, 1.000, 1.000 }, { 0.600, 0.600, 0.800, 1.000 }, { 0.600, 0.600, 0.600, 1.000 }, { 0.600, 0.600, 0.400, 1.000 }, { 0.600, 0.600, 0.200, 1.000 }, { 0.600, 0.600, 0.000, 1.000 }, { 0.600, 0.400, 1.000, 1.000 }, { 0.600, 0.400, 0.800, 1.000 }, { 0.600, 0.400, 0.600, 1.000 }, { 0.600, 0.400, 0.400, 1.000 }, { 0.600, 0.400, 0.200, 1.000 }, { 0.600, 0.400, 0.000, 1.000 }, { 0.600, 0.200, 1.000, 1.000 }, { 0.600, 0.200, 0.800, 1.000 }, { 0.600, 0.200, 0.600, 1.000 }, { 0.600, 0.200, 0.400, 1.000 }, { 0.600, 0.200, 0.200, 1.000 }, { 0.600, 0.200, 0.000, 1.000 }, { 0.600, 0.000, 1.000, 1.000 }, { 0.600, 0.000, 0.800, 1.000 }, { 0.600, 0.000, 0.600, 1.000 }, { 0.600, 0.000, 0.400, 1.000 }, { 0.600, 0.000, 0.200, 1.000 }, { 0.600, 0.000, 0.000, 1.000 }, { 0.400, 1.000, 1.000, 1.000 }, { 0.400, 1.000, 0.800, 1.000 }, { 0.400, 1.000, 0.600, 1.000 }, { 0.400, 1.000, 0.400, 1.000 }, { 0.400, 1.000, 0.200, 1.000 }, { 0.400, 1.000, 0.000, 1.000 }, { 0.400, 0.800, 1.000, 1.000 }, { 0.400, 0.800, 0.800, 1.000 }, { 0.400, 0.800, 0.600, 1.000 }, { 0.400, 0.800, 0.400, 1.000 }, { 0.400, 0.800, 0.200, 1.000 }, { 0.400, 0.800, 0.000, 1.000 }, { 0.400, 0.600, 1.000, 1.000 }, { 0.400, 0.600, 0.800, 1.000 }, { 0.400, 0.600, 0.600, 1.000 }, { 0.400, 0.600, 0.400, 1.000 }, { 0.400, 0.600, 0.200, 1.000 }, { 0.400, 0.600, 0.000, 1.000 }, { 0.400, 0.400, 1.000, 1.000 }, { 0.400, 0.400, 0.800, 1.000 }, { 0.400, 0.400, 0.600, 1.000 }, { 0.400, 0.400, 0.400, 1.000 }, { 0.400, 0.400, 0.200, 1.000 }, { 0.400, 0.400, 0.000, 1.000 }, { 0.400, 0.200, 1.000, 1.000 }, { 0.400, 0.200, 0.800, 1.000 }, { 0.400, 0.200, 0.600, 1.000 }, { 0.400, 0.200, 0.400, 1.000 }, { 0.400, 0.200, 0.200, 1.000 }, { 0.400, 0.200, 0.000, 1.000 }, { 0.400, 0.000, 1.000, 1.000 }, { 0.400, 0.000, 0.800, 1.000 }, { 0.400, 0.000, 0.600, 1.000 }, { 0.400, 0.000, 0.400, 1.000 }, { 0.400, 0.000, 0.200, 1.000 }, { 0.400, 0.000, 0.000, 1.000 }, { 0.200, 1.000, 1.000, 1.000 }, { 0.200, 1.000, 0.800, 1.000 }, { 0.200, 1.000, 0.600, 1.000 }, { 0.200, 1.000, 0.400, 1.000 }, { 0.200, 1.000, 0.200, 1.000 }, { 0.200, 1.000, 0.000, 1.000 }, { 0.200, 0.800, 1.000, 1.000 }, { 0.200, 0.800, 0.800, 1.000 }, { 0.200, 0.800, 0.600, 1.000 }, { 0.200, 0.800, 0.400, 1.000 }, { 0.200, 0.800, 0.200, 1.000 }, { 0.200, 0.800, 0.000, 1.000 }, { 0.200, 0.600, 1.000, 1.000 }, { 0.200, 0.600, 0.800, 1.000 }, { 0.200, 0.600, 0.600, 1.000 }, { 0.200, 0.600, 0.400, 1.000 }, { 0.200, 0.600, 0.200, 1.000 }, { 0.200, 0.600, 0.000, 1.000 }, { 0.200, 0.400, 1.000, 1.000 }, { 0.200, 0.400, 0.800, 1.000 }, { 0.200, 0.400, 0.600, 1.000 }, { 0.200, 0.400, 0.400, 1.000 }, { 0.200, 0.400, 0.200, 1.000 }, { 0.200, 0.400, 0.000, 1.000 }, { 0.200, 0.200, 1.000, 1.000 }, { 0.200, 0.200, 0.800, 1.000 }, { 0.200, 0.200, 0.600, 1.000 }, { 0.200, 0.200, 0.400, 1.000 }, { 0.200, 0.200, 0.200, 1.000 }, { 0.200, 0.200, 0.000, 1.000 }, { 0.200, 0.000, 1.000, 1.000 }, { 0.200, 0.000, 0.800, 1.000 }, { 0.200, 0.000, 0.600, 1.000 }, { 0.200, 0.000, 0.400, 1.000 }, { 0.200, 0.000, 0.200, 1.000 }, { 0.200, 0.000, 0.000, 1.000 }, { 0.000, 1.000, 1.000, 1.000 }, { 0.000, 1.000, 0.800, 1.000 }, { 0.000, 1.000, 0.600, 1.000 }, { 0.000, 1.000, 0.400, 1.000 }, { 0.000, 1.000, 0.200, 1.000 }, { 0.000, 1.000, 0.000, 1.000 }, { 0.000, 0.800, 1.000, 1.000 }, { 0.000, 0.800, 0.800, 1.000 }, { 0.000, 0.800, 0.600, 1.000 }, { 0.000, 0.800, 0.400, 1.000 }, { 0.000, 0.800, 0.200, 1.000 }, { 0.000, 0.800, 0.000, 1.000 }, { 0.000, 0.600, 1.000, 1.000 }, { 0.000, 0.600, 0.800, 1.000 }, { 0.000, 0.600, 0.600, 1.000 }, { 0.000, 0.600, 0.400, 1.000 }, { 0.000, 0.600, 0.200, 1.000 }, { 0.000, 0.600, 0.000, 1.000 }, { 0.000, 0.400, 1.000, 1.000 }, { 0.000, 0.400, 0.800, 1.000 }, { 0.000, 0.400, 0.600, 1.000 }, { 0.000, 0.400, 0.400, 1.000 }, { 0.000, 0.400, 0.200, 1.000 }, { 0.000, 0.400, 0.000, 1.000 }, { 0.000, 0.200, 1.000, 1.000 }, { 0.000, 0.200, 0.800, 1.000 }, { 0.000, 0.200, 0.600, 1.000 }, { 0.000, 0.200, 0.400, 1.000 }, { 0.000, 0.200, 0.200, 1.000 }, { 0.000, 0.200, 0.000, 1.000 }, { 0.000, 0.000, 1.000, 1.000 }, { 0.000, 0.000, 0.800, 1.000 }, { 0.000, 0.000, 0.600, 1.000 }, { 0.000, 0.000, 0.400, 1.000 }, { 0.000, 0.000, 0.200, 1.000 }, { 0.933, 0.000, 0.000, 1.000 }, { 0.867, 0.000, 0.000, 1.000 }, { 0.733, 0.000, 0.000, 1.000 }, { 0.667, 0.000, 0.000, 1.000 }, { 0.533, 0.000, 0.000, 1.000 }, { 0.467, 0.000, 0.000, 1.000 }, { 0.333, 0.000, 0.000, 1.000 }, { 0.267, 0.000, 0.000, 1.000 }, { 0.133, 0.000, 0.000, 1.000 }, { 0.067, 0.000, 0.000, 1.000 }, { 0.000, 0.933, 0.000, 1.000 }, { 0.000, 0.867, 0.000, 1.000 }, { 0.000, 0.733, 0.000, 1.000 }, { 0.000, 0.667, 0.000, 1.000 }, { 0.000, 0.533, 0.000, 1.000 }, { 0.000, 0.467, 0.000, 1.000 }, { 0.000, 0.333, 0.000, 1.000 }, { 0.000, 0.267, 0.000, 1.000 }, { 0.000, 0.133, 0.000, 1.000 }, { 0.000, 0.067, 0.000, 1.000 }, { 0.000, 0.000, 0.933, 1.000 }, { 0.000, 0.000, 0.867, 1.000 }, { 0.000, 0.000, 0.733, 1.000 }, { 0.000, 0.000, 0.667, 1.000 }, { 0.000, 0.000, 0.533, 1.000 }, { 0.000, 0.000, 0.467, 1.000 }, { 0.000, 0.000, 0.333, 1.000 }, { 0.000, 0.000, 0.267, 1.000 }, { 0.000, 0.000, 0.133, 1.000 }, { 0.000, 0.000, 0.067, 1.000 }, { 0.933, 0.933, 0.933, 1.000 }, { 0.867, 0.867, 0.867, 1.000 }, { 0.733, 0.733, 0.733, 1.000 }, { 0.667, 0.667, 0.667, 1.000 }, { 0.533, 0.533, 0.533, 1.000 }, { 0.467, 0.467, 0.467, 1.000 }, { 0.333, 0.333, 0.333, 1.000 }, { 0.267, 0.267, 0.267, 1.000 }, { 0.133, 0.133, 0.133, 1.000 }, { 0.067, 0.067, 0.067, 1.000 }, { 0.000, 0.000, 0.000, 1.000 } };