## Tidewall's one table of colours: the drowned-coast palette from docs/STYLE.md. ## Every colour the client draws with comes from here, so the look stays one look; a ## test (test_palette.gd) fails on a colour literal anywhere else in src/client, ## src/app or src/ui. All values are sRGB. Add a colour here, named for what it is in the world, ## before using it, and add it to the table in docs/STYLE.md. class_name Palette extends RefCounted # --- Wood, rope and tar ------------------------------------------------------------- ## Fresh pine tar on hulls, piles and sheds. The darkest thing in the world. const TAR: Color = Color(0.19, 0.16, 0.13) ## Tar that has weathered grey-brown: wrecks and old piles. const TAR_WEATHERED: Color = Color(0.31, 0.26, 0.22) ## Grey planking on walls and decks. const PLANK: Color = Color(0.50, 0.45, 0.37) ## Planks bleached pale by salt and sun: wreck ribs, jetties. const PLANK_BLEACHED: Color = Color(0.64, 0.60, 0.52) ## Driftwood, the first build material. const DRIFTWOOD: Color = Color(0.62, 0.50, 0.36) ## Crates and chests' unpainted wood. const CRATE_WOOD: Color = Color(0.68, 0.55, 0.38) ## Pine bark. const BARK: Color = Color(0.40, 0.30, 0.22) ## The dark inside of an emptied chest or hold. const HOLD_SHADOW: Color = Color(0.22, 0.20, 0.18) ## Hemp rope and sailcloth, unbleached. const CANVAS: Color = Color(0.84, 0.80, 0.68) ## Sails tanned with bark, as working boats had them. const TANNED_SAIL: Color = Color(0.62, 0.44, 0.28) # --- Stone, iron and salt ----------------------------------------------------------- ## Field stone in walls and quays. const STONE: Color = Color(0.56, 0.54, 0.49) ## Loose boulders, a touch cooler than walls. const BOULDER: Color = Color(0.56, 0.55, 0.51) ## Dressed stone, the second build material. const DRESSED_STONE: Color = Color(0.60, 0.59, 0.55) ## Yellow-grey lichen on high rock. const LICHEN: Color = Color(0.62, 0.61, 0.45) ## Rusted salvage iron, the third build material. const SALVAGE_IRON: Color = Color(0.50, 0.34, 0.26) ## Salt pans and whitewash. const SALT: Color = Color(0.90, 0.90, 0.86) # --- Salt-faded paint --------------------------------------------------------------- ## Red ochre roofs and doors, faded. const OCHRE_RED: Color = Color(0.56, 0.27, 0.20) ## Verdigris sea-green paint on trim, shutters and sea chests. const SEA_PAINT: Color = Color(0.33, 0.55, 0.56) ## Oilskin yellow: the local player's coat, and the one warm accent of the HUD. const OILSKIN: Color = Color(0.86, 0.66, 0.16) ## Moss-green oilskin. const OILSKIN_MOSS: Color = Color(0.36, 0.40, 0.30) ## Slate-grey oilskin. const OILSKIN_SLATE: Color = Color(0.48, 0.46, 0.44) ## Faded navy oilskin. const OILSKIN_NAVY: Color = Color(0.30, 0.36, 0.48) ## Gilt on carved figureheads, loot glints and the lamp's brass. const GILT: Color = Color(0.93, 0.80, 0.42) ## Lamp glass, lit. const LAMP: Color = Color(0.98, 0.86, 0.55) ## Window glass seen from outside, by day. const WINDOW_PANE: Color = Color(0.13, 0.16, 0.17) ## Multiplied into a chest once it has been opened, dulling its paint. const OPENED_DULL: Color = Color(0.45, 0.43, 0.42) ## Weathered skin. const SKIN: Color = Color(0.74, 0.58, 0.46) # --- Growing things ----------------------------------------------------------------- const NEEDLES: Array[Color] = [Color(0.22, 0.36, 0.28), Color(0.26, 0.40, 0.30), Color(0.31, 0.44, 0.32)] const SCRUB: Array[Color] = [Color(0.45, 0.48, 0.30), Color(0.53, 0.53, 0.34)] # --- Sky and air -------------------------------------------------------------------- const SKY_TOP: Color = Color(0.32, 0.50, 0.68) ## The pale, salt-hazed horizon. const SKY_HAZE: Color = Color(0.82, 0.78, 0.68) const SKY_BELOW: Color = Color(0.18, 0.20, 0.20) const SEA_FOG: Color = Color(0.78, 0.78, 0.74) ## Weather (A6): the gale's low cloud overhead and on the horizon, the dusk haze and the ## low sun's warm light, as the match wears on and the storm builds. const STORM_SKY: Color = Color(0.36, 0.40, 0.44) const STORM_HAZE: Color = Color(0.58, 0.60, 0.60) const DUSK_HAZE: Color = Color(0.86, 0.66, 0.50) const DUSK_SUN: Color = Color(1.0, 0.78, 0.56) ## Rain streaks, pale and mostly clear. const RAIN: Color = Color(0.80, 0.84, 0.86, 0.22) # --- The sea (A6) ------------------------------------------------------------------- ## Water over sand, open water, the gale's darker open water and the foam. const SEA_SHALLOW: Color = Color(0.42, 0.55, 0.50) const SEA_DEEP: Color = Color(0.10, 0.22, 0.30) const SEA_STORM: Color = Color(0.13, 0.20, 0.22) const SEA_FOAM: Color = Color(0.86, 0.88, 0.84) ## Under the surface: the murk a swimmer sees. const SEA_MURK: Color = Color(0.12, 0.28, 0.30) # --- Print and paper (the woodcut pass and the HUD) --------------------------------- ## Printer's ink: outlines and hatching, warm, never pure black. const INK: Color = Color(0.16, 0.13, 0.11) ## Unbleached paper: HUD panels and text on dark ground. const PAPER: Color = Color(0.91, 0.87, 0.78) ## Paper in shadow, for panel edges and dimmed text. const PAPER_DIM: Color = Color(0.66, 0.62, 0.54) ## Brass seen on paper: the edge of the menu control that has focus. const GILT_DEEP: Color = Color(0.62, 0.45, 0.12) ## Dark text outline on the HUD. const OUTLINE: Color = Color(0.08, 0.08, 0.08) # --- Signals ------------------------------------------------------------------------ ## "Allowed" in the build ghost: sea green. const GHOST_OK: Color = Color(0.46, 0.80, 0.70, 0.38) ## "Refused" in the build ghost: rust red. const GHOST_REFUSED: Color = Color(0.86, 0.32, 0.22, 0.38) ## Danger on the HUD: the tide's next line, low health. Paired with a shape or a word, ## never alone. const WARNING: Color = Color(0.86, 0.32, 0.22) ## The sea on the HUD's tide gauge and map. const SEA_INK: Color = Color(0.20, 0.34, 0.42) # --- Colour vision (A13) ------------------------------------------------------------ ## The signal colours above suit most eyes, but red against green (the build ghost) and ## rust against oilskin yellow are hard for many people to tell apart. The settings ## offer a set for each common kind of colour blindness; everything that signals asks ## for its colour through the functions below, so the set chosen applies everywhere. ## test_palette checks each set with a simulation of the colour vision it is for. const VISION_NAMES: Array[String] = ["Standard", "Red-green (protan, deutan)", "Blue-yellow (tritan)"] const VISION_STANDARD: int = 0 const VISION_RED_GREEN: int = 1 const VISION_BLUE_YELLOW: int = 2 ## Per set: allowed and refused in the build ghost, danger, and the player's own marks. const VISION_SIGNALS: Array[Dictionary] = [ {"ghost_ok": GHOST_OK, "ghost_refused": GHOST_REFUSED, "warning": WARNING, "own": OILSKIN}, # Blue for allowed and orange for refused; danger a deep magenta, apart from the # yellow of the player's own marks. {"ghost_ok": Color(0.22, 0.52, 0.95, 0.40), "ghost_refused": Color(0.98, 0.56, 0.08, 0.40), "warning": Color(0.78, 0.16, 0.62), "own": OILSKIN}, # Teal for allowed and vermilion for refused; the player's marks turn white-blue, # since yellow and pink run together. {"ghost_ok": Color(0.16, 0.70, 0.74, 0.40), "ghost_refused": Color(0.90, 0.16, 0.20, 0.40), "warning": Color(0.88, 0.14, 0.18), "own": Color(0.62, 0.86, 0.98)}, ] ## Which set is in use. GameSettings.apply_to_program sets it. static var vision: int = VISION_STANDARD: set(value): vision = clampi(value, 0, VISION_SIGNALS.size() - 1) static func ghost_ok() -> Color: return VISION_SIGNALS[vision]["ghost_ok"] static func ghost_refused() -> Color: return VISION_SIGNALS[vision]["ghost_refused"] ## Danger on the HUD and chart (WARNING in the standard set). static func warning() -> Color: return VISION_SIGNALS[vision]["warning"] ## The player's own marks on the HUD and chart (OILSKIN in the standard set). static func own() -> Color: return VISION_SIGNALS[vision]["own"]