defaultColorNames
See source codeArray of default color names available in tldraw's color palette. These colors form the basis for the default color style system and are available in both light and dark theme variants.
defaultColorNames: readonly [
'black',
'grey',
'light-violet',
'violet',
'blue',
'light-blue',
'yellow',
'orange',
'green',
'light-green',
'light-red',
'red',
'white',
]
Example
import { defaultColorNames } from '@tldraw/tlschema'
// Create a color picker with all default colors
const colorOptions = defaultColorNames.map((color) => ({
name: color,
value: color,
}))
Prev
defaultBindingSchemasNext
DefaultColorStyle