Ant Design Svelte

Dark mode

Dark mode changes the relationship between surfaces, text and accents while preserving content and interface hierarchy. It suits low-light environments and tasks where content needs to stand out against a quiet background.

Reading comfort

Avoid excessive contrast across large surfaces, bright borders and uniformly saturated accents. Light text on a completely black background alone does not guarantee comfort. Check sustained reading, dense tables, secondary labels and selected states in their surroundings.

Preserving hierarchy

Reading order, action placement and the meaning of statuses stay the same. Card surfaces, the page background and popups should remain distinguishable without a strong shadow. Required information must remain visible when secondary colours are subdued.

Colour and surfaces

Palettes adapt to their background: simply inverting RGB values does not preserve perceived brightness or relationships between hues. Use semantic design tokens such as colorText, colorBgContainer, colorBgElevated and colorBorder. Pair error colour with a message and selected states with a recognisable selection indicator.

Palette primary colour
colorPrimaryBg
#15325b
colorPrimaryBorder
#15325b
colorPrimaryHover
#3c89e8
colorPrimary
#1668dc
colorPrimaryActive
#1554ad
colorText
rgba(255,255,255,0.85)
colorTextSecondary
rgba(255,255,255,0.65)
colorBgContainer
#141414

red

  1. #2a12151
  2. #4314182
  3. #58181c3
  4. #791a1f4
  5. #a61d245
  6. #d320296
  7. #e847497
  8. #f373708
  9. #f89f9a9
  10. #fac8c310

volcano

  1. #2b16111
  2. #441d122
  3. #5927163
  4. #7c31184
  5. #aa3e195
  6. #d84a1b6
  7. #e870407
  8. #f3956a8
  9. #f8b6929
  10. #fad4bc10

orange

  1. #2b1d111
  2. #442a112
  3. #5938153
  4. #7c4a154
  5. #aa62155
  6. #d87a166
  7. #e89a3c7
  8. #f3b7658
  9. #f8cf8d9
  10. #fae3b710

gold

  1. #2b21111
  2. #4431112
  3. #5942143
  4. #7c59144
  5. #aa77145
  6. #d896146
  7. #e8b3397
  8. #f3cc628
  9. #f8df8b9
  10. #faedb510

yellow

  1. #2b26111
  2. #443b112
  3. #5950143
  4. #7c6e144
  5. #aa95145
  6. #d8bd146
  7. #e8d6397
  8. #f3ea628
  9. #f8f48b9
  10. #fafab510

lime

  1. #1f26111
  2. #2e3c102
  3. #3e4f133
  4. #536d134
  5. #6f94125
  6. #8bbb116
  7. #a9d1347
  8. #c9e75d8
  9. #e4f88b9
  10. #f0fab510

green

  1. #1623121
  2. #1d37122
  3. #2749163
  4. #3063174
  5. #3c86185
  6. #49aa196
  7. #6abe397
  8. #8fd4608
  9. #b2e58b9
  10. #d5f2bb10

cyan

  1. #1121231
  2. #1135362
  3. #1448483
  4. #1462624
  5. #1385855
  6. #13a8a86
  7. #33bcb77
  8. #58d1c98
  9. #84e2d89
  10. #b2f1e810

blue

  1. #111a2c1
  2. #1125452
  3. #15325b3
  4. #15417e4
  5. #1554ad5
  6. #1668dc6
  7. #3c89e87
  8. #65a9f38
  9. #8dc5f89
  10. #b7dcfa10

geekblue

  1. #1316291
  2. #161d402
  3. #1c27553
  4. #2031754
  5. #263ea05
  6. #2b4acb6
  7. #5273e07
  8. #7f9ef38
  9. #a8c1f89
  10. #d2e0fa10

purple

  1. #1a13251
  2. #24163a2
  3. #301c4d3
  4. #3e20694
  5. #51258f5
  6. #642ab56
  7. #854eca7
  8. #ab7ae08
  9. #cda8f09
  10. #ebd7fa10

magenta

  1. #2913211
  2. #40162f2
  3. #551c3b3
  4. #75204f4
  5. #a026695
  6. #cb2b836
  7. #e0529c7
  8. #f37fb78
  9. #f8a8cc9
  10. #fad2e310

Colour roles and palettes

ColorPicker changes the primary colour; public tokens show semantic roles and twelve base palettes.

Theming in @woodger/antd

Switch the theme in the header settings and compare this page with the component examples. The theme guide demonstrates an independent ConfigProvider scope and reactive token access. Custom surfaces should obtain their colours from the same theme.

Images and states

Check icons, charts, photographs and transparent images separately. An illustration can retain its own light background when that background is part of the material. In forms, check focus, hover, disabled, error and loading states; theme changes should preserve entered data and focus.

Adapted from the guide by Ant Design. MIT.