Skip to content

Color and Palette

curveo edited this page May 12, 2026 · 1 revision

Color and Palette


Color formats in CSS

TesseraUI supports all common CSS color notations plus Minecraft's 8-digit ARGB hex:

/* Named colors */
color: white;
color: black;
color: transparent;

/* 3-digit hex → expanded to #RRGGBB, alpha = FF */
color: #F80;           /* → #FF8800 */

/* 6-digit hex, alpha = FF */
color: #FF8800;

/* 8-digit AARRGGBB — Minecraft / Java format */
color: #80FF8800;      /* 50% transparent orange */

/* rgb() */
color: rgb(255, 128, 0);

Named colors

Name Hex
white #FFFFFF
black #000000
red #FF0000
green #008000
lime #00FF00
blue #0000FF
yellow #FFFF00
gray / grey #808080
silver #C0C0C0
orange #FFA500
purple #800080
cyan #00FFFF
magenta #FF00FF
pink #FFC0CB
brown #A52A2A
navy #000080
teal #008080
gold #FFD700
copper #B87333
maroon #800000
olive #808000
aqua #00FFFF
fuchsia #FF00FF
indigo #4B0082
violet #EE82EE
coral #FF7F50
salmon #FA8072
khaki #F0E68C
beige #F5F5DC
transparent #00000000

Color formats in Java

TesseraUI uses standard Java int ARGB colours (same as Minecraft):

int color = 0xFFB87333;   // fully opaque copper
int color = 0x80FFFFFF;   // 50% transparent white
int color = 0x00000000;   // fully transparent

TesseraPalette

A copper-patina design system built into TesseraUI. Use these constants for a consistent look:

import com.tesseraui.TesseraPalette;

Base palette

Constant Hex Role
BG0 #0D0E14 Darkest background (panel base)
BG1 #14161F Standard panel background
BG2 #1E2030 Elevated surface / card
BG3 #252840 Hover surface

Copper accents

Constant Hex Role
COPPER #B87333 Primary accent
COPPER_HI #E8A24A Highlighted / hovered accent
COPPER_LO #7A4F22 Subtle border / muted accent

Text

Constant Hex Role
CREAM #F3E7D3 Primary text
CREAM_DIM #A09880 Secondary / muted text
TEXT_MUTE #5C5444 Placeholder / disabled text

Semantic

Constant Hex Role
GOOD #22C55E Success / positive
WARN #F59E0B Warning
DANGER #EF4444 Error / destructive
INFO #3B82F6 Informational

Utilities

Constant Role
LINE Separator / rule colour
TRANSPARENT 0x00000000

Example

TesseraPanel card = TesseraPanel.column(x, y, w, h)
    .background(TesseraPalette.BG2)
    .border(1, TesseraPalette.COPPER_LO)
    .padding(6).gap(4);

card.add(new TesseraLabel(0, 0, w - 12, 10, "Title")
    .color(TesseraPalette.COPPER_HI)
    .fontSize(8f));

card.add(new TesseraLabel(0, 0, w - 12, 9, "Description")
    .color(TesseraPalette.CREAM_DIM)
    .fontSize(6f));

Clone this wiki locally