tp.Colors

tp.Colors is a static core helper with named CSS color constants and a few small utility methods. It is useful when Tripous code needs a known color list for controls, demo data, color pickers, or visual samples without hard-coding the same names again and again.

tp.Colors.ToOptionList() returns objects in { Text, Value } form. Shade() and Shade2() produce lighter or darker variants of a hex color. SetGradientStyle() returns a CSS linear-gradient() value and may also apply it to an element.

Named color list

ToOptionList() returns all color constants as text/value pairs. The preview below uses the returned array directly.

Shade methods

Enter any hex color and generate darker/lighter variants with Shade() and Shade2().

Swatches

Click a swatch to copy its value to the base color input and refresh the shade and gradient previews.

Gradient

SetGradientStyle() returns the CSS value and can apply it to an element in one call.

Gradient preview