All files / packages/ui/src/themes colors.ts

100% Statements 21/21
100% Branches 0/0
100% Functions 0/0
100% Lines 21/21

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 35230x         30x         30x         30x                                 30x                 30x         30x                                         30x             30x                     30x                                                                                                                                                                                                                                                             30x                   30x   30x     30x               30x         30x               30x         30x             30x                   30x                                                                                                                                                           30x      
const redPallet = {
  red90: "#C93A3A",
  red80: "#F3513D",
};
 
const greenPallet = {
  green90: "#34A853",
  green80: "#0BBAA0",
};
 
const yellowPallet = {
  yellow90: "#FBBC05",
  yellow80: "#FFC36A",
};
 
const grayPallet = {
  gray100: "#000000", // Black
  gray90: "#383337", // Dark gray/black
  gray85: "#687074",
  gray80: "#737373", // Medium gray
  gray70: "#817F7F", // Modal gray
  gray60: "#868686", // Medium gray badge
  gray50: "#959595", // Dark gray badge
  gray40: "#A1A1A1", // Light gray text
  gray30: "#ACACAC", // Button background
  gray25: "#C4C4C4",
  gray20: "#BFBFBF", // Main background gray
  gray15: "#EBEBEB", // Screen muted background
  gray10: "#D3D3D3", // Light gray
  gray5: "#D9D9D9", // Light gray
};
 
const bluePallet = {
  blue100: "#132b8c", // Dark blue
  blue95: "#152C91", // Brand blue (Login, Login bubble)
  blue90: "#1D3B79", // Dark blue border
  blue85: "#1E52AC", // Brand medium blue (Splash bubble)
  blue80: "#007AFF", // iOS blue
  blue70: "#2F9FE8",
};
 
const whitePallet = {
  white: "#FFFFFF",
  white50: "#E9EAEB",
};
 
const slatePallet = {
  slate100: "#3E4555",
  slate97: "#404653",
  slate95: "#424959",
  slate90: "#434B5C",
  slate85: "#474E5E",
  slate80: "#4F5665",
  slate75: "#5A6170",
  slate70: "#606775",
  slate60: "#8D929D",
  slate50: "#A1A3A9",
  slate45: "#A4AAB5",
  slate40: "#B3B6BC",
  slate35: "#B6BAC2",
  slate30: "#C1C3C9",
  slate25: "#C3C5CB",
  slate20: "#C9CCD2",
  slate15: "#D0D3D9",
  slate10: "#F4F4F5",
};
 
const requestCategoryPallet = {
  requestCategoryTimeOff: "#404653",
  requestCategoryBookRoom: "#C7C9CD",
  requestCategoryMaintenance: "#D7D7D7",
  requestCategoryReallocation: "#9FA1A6",
};
 
export const pallets = {
  ...grayPallet,
  ...bluePallet,
  ...whitePallet,
  ...slatePallet,
  ...requestCategoryPallet,
  ...greenPallet,
  ...redPallet,
  ...yellowPallet,
} as const;
 
export const lightColors = {
  ...pallets,
  // Background colors
  background: {
    default: pallets.white,
    page: pallets.white,
    pageMuted: pallets.gray15,
    primary: pallets.gray20,
    secondary: pallets.white,
    tertiary: pallets.gray10,
    surface: pallets.gray10,
    errorMuted: pallets.gray10,
    skyMuted: pallets.gray70,
    selectedStrong: pallets.slate97,
    card: pallets.slate10,
    selected: pallets.slate90,
    mask: pallets.slate60,
    error: pallets.red80,
    success: pallets.green80,
    warning: pallets.yellow80,
    info: pallets.blue80,
    dark: pallets.gray90,
    modal: pallets.gray70,
    disabled: pallets.white50,
    overlay: "rgba(129, 127, 127, 0.95)",
    requestStack: pallets.gray20,
    overlayApprove: "rgba(129, 127, 127, 0.95)",
    overlayReject: "rgba(129, 127, 127, 0.95)",
    sliderTrack: pallets.gray15,
    sliderProgress: pallets.gray20,
    current: pallets.gray5,
  },
  // Text colors
  text: {
    default: pallets.gray90,
    primary: pallets.gray90,
    secondary: pallets.gray100,
    tertiary: pallets.gray40,
    heading: pallets.slate97,
    muted: pallets.slate85,
    placeholder: pallets.slate50,
    disabledSoft: pallets.slate40,
    disabled: pallets.slate30,
    emphasis: pallets.slate100,
    white: pallets.white,
    dark: pallets.gray100,
    success: pallets.green90,
    error: pallets.red80,
    warning: pallets.yellow80,
    info: pallets.blue80,
    normal: pallets.gray90,
    // Text rendered on top of badge.brand — same as `primary` until v2 overrides it
    onBrand: pallets.gray90,
    onBehalf: pallets.slate97,
    // Unselected chip label — fixed dark slate in both themes (Figma: #404653)
    chip: pallets.slate97,
  },
  // Badge/Button colors
  badge: {
    dark: pallets.gray50,
    light: pallets.gray10,
    medium: pallets.gray60,
    border: pallets.gray80,
    button: pallets.gray30,
    dot: pallets.gray5,
    // Brand-emphasis fill (e.g. the Home menu bubble) — same as `light` until v2 overrides it
    brand: pallets.gray10,
    actionDone: pallets.slate97,
    actionCancel: pallets.gray25,
    statusPending: pallets.gray50,
  },
  // Border colors
  border: {
    default: pallets.gray10,
    primary: pallets.gray90,
    secondary: pallets.gray100,
    tertiary: pallets.blue80,
    subtle: pallets.slate35,
    strong: pallets.slate70,
    divider: pallets.slate20,
    slot: pallets.slate25,
    slotDisabled: pallets.slate15,
    disabled: pallets.gray30,
    // Brand-emphasis border ring (e.g. the Home menu bubble) — same as `primary` until v2 overrides it
    brand: pallets.gray90,
    avatarSelected: pallets.green80,
  },
  // Shadow colors
  shadow: {
    black: pallets.gray100,
    default: pallets.gray100,
  },
  // UI colors
  ui: {
    blue: pallets.blue80,
    darkBlue: pallets.blue100,
    brandBlue: pallets.blue95,
    mediumBlue: pallets.blue85,
  },
  // Icon colors
  icon: {
    default: pallets.gray90,
    primary: pallets.white,
    active: pallets.blue80,
    inactive: pallets.gray40,
    subtle: pallets.slate45,
    strong: pallets.slate75,
    emphasis: pallets.slate80,
    success: pallets.green80,
    error: pallets.red80,
    // Brand-emphasis icon color — same as `active` in v1, overridden to primary70 in v2
    brand: pallets.slate97,
    close: pallets.slate97,
  },
  requestCategory: {
    timeOff: pallets.requestCategoryTimeOff,
    bookRoom: pallets.requestCategoryBookRoom,
    maintenance: pallets.requestCategoryMaintenance,
    reallocation: pallets.requestCategoryReallocation,
  },
  skeleton: {
    default: pallets.gray20,
    active: pallets.gray10,
  },
};
 
// TODO: dark mode has no design yet — reuse light colors until the dark palette is designed
export const darkColors = {
  ...lightColors,
};
 
/**
 * Whether the dark themes actually render dark surfaces. Both dark palettes
 * currently mirror the light ones, so anything that styles chrome around the
 * palette (status bar content, for instance) must stay in its light variant.
 * Flip this together with the real `darkColors` / `darkV2Colors`.
 */
export const HAS_DARK_PALETTE = false;
 
export const colors = lightColors;
 
// v2 theme palette — from Figma "COLOR SYSTEM" (node 4118:59514)
const v2PrimaryPallet = {
  primary90: "#1E3968",
  primary70: "#2F9FE8",
  primary60: "#7FCAF9",
  primary50: "#4784aaff",
  primary40: "#1D4A9F",
};
 
const v2AccentPallet = {
  accent60: "#FB4D89",
  accent40: "#E02278",
};
 
const v2BackgroundPallet = {
  background95: "#F7F7F8",
  background90: "#EFF5FD",
  currentLocation: "#BAE4FF",
  surfaceMuted: "#E5F3FD",
  errorMuted: "#FFCDCF",
};
 
const v2BorderPallet = {
  border20: "#DFE8F5",
  border10: "#EBEEF0",
};
 
const v2TextPallet = {
  textMuted: "#6B7FA0",
  textError: "#FF696E",
  textDisabled: "#BDBDBD",
  textNormal: "#404653",
};
 
export const v2Pallets = {
  ...v2PrimaryPallet,
  ...v2AccentPallet,
  ...v2BackgroundPallet,
  ...v2BorderPallet,
  ...v2TextPallet,
} as const;
 
// v2 only redefines background/text/border/icon/badge.brand/badge.button — everything
// else (shadow, ui, requestCategory, skeleton, status colors) carries over unchanged
export const lightV2Colors = {
  ...lightColors,
  ...v2Pallets,
  background: {
    ...lightColors.background,
    default: pallets.white,
    page: pallets.white,
    pageMuted: pallets.white,
    card: pallets.white,
    tertiary: v2Pallets.border20,
    surface: v2Pallets.surfaceMuted,
    errorMuted: v2Pallets.errorMuted,
    skyMuted: v2Pallets.primary60,
    selected: v2Pallets.background90,
    selectedStrong: v2Pallets.primary70,
    requestStack: v2Pallets.primary70,
    overlayApprove: v2Pallets.primary70,
    overlayReject: pallets.gray85,
    sliderTrack: v2Pallets.border20,
    sliderProgress: v2Pallets.primary70,
    current: v2Pallets.currentLocation,
  },
  text: {
    ...lightColors.text,
    heading: v2Pallets.primary70,
    secondary: v2Pallets.textMuted,
    muted: v2Pallets.textMuted,
    placeholder: v2Pallets.textMuted,
    error: v2Pallets.textError,
    info: v2Pallets.primary70,
    emphasis: v2Pallets.accent40,
    onBrand: lightColors.text.white,
    onBehalf: v2Pallets.primary90,
    disabledSoft: v2Pallets.textDisabled,
    normal: v2Pallets.textNormal,
  },
  badge: {
    ...lightColors.badge,
    brand: v2Pallets.primary70,
    button: v2Pallets.accent40,
    actionDone: v2Pallets.accent40,
    actionCancel: v2Pallets.border20,
    statusPending: v2Pallets.accent60,
  },
  border: {
    ...lightColors.border,
    default: v2Pallets.border10,
    primary: v2Pallets.primary70,
    subtle: v2Pallets.border20,
    divider: v2Pallets.border10,
    brand: v2Pallets.accent60,
    avatarSelected: v2Pallets.primary70,
    strong: v2Pallets.primary90,
    slot: v2Pallets.textMuted,
    slotDisabled: v2Pallets.textDisabled,
  },
  icon: {
    ...lightColors.icon,
    active: v2Pallets.primary70,
    brand: v2Pallets.primary70,
    emphasis: v2Pallets.primary90,
    subtle: v2Pallets.border20,
  },
  skeleton: {
    ...lightColors.skeleton,
    default: v2Pallets.border20,
    active: v2Pallets.background90,
  },
  requestCategory: {
    ...lightColors.requestCategory,
    timeOff: v2Pallets.primary90,
    bookRoom: v2Pallets.primary70,
    maintenance: v2Pallets.primary50,
    reallocation: v2Pallets.primary40,
  },
};
 
// TODO: v2 dark mode has no design yet — reuse lightV2Colors until the dark palette is designed
export const darkV2Colors = {
  ...lightV2Colors,
};