F
Filament4mo ago
Aubrey

Is there any way to add a 'custom' named color to the default 6 colors?

I want to be able to change colors via a service provider FilamentColor::register mode. Works great with the six default named colors, primary, danger, etc. I can do this in my tailwind.config.js referencing the Filament preset and it works for 'custom' when I change the service provider danger color, but still only gives the six options.
colors: {
custom: preset.theme.extend.colors.danger,
}
colors: {
custom: preset.theme.extend.colors.danger,
}
Is there any way to add to the six?
1 Reply
Lara Zeus
Lara Zeus4mo ago
if you want to override any of these colors you can do:
'primary' => Color::hex('#45B39D'),
'primary' => Color::hex('#45B39D'),
if you want. to add a new color where you're using it? since filament wont care about other colors toy can do in your tailwind
water: {
DEFAULT: '#45B39D',
50: '#C6E9E2',
100: '#B8E4DB',
200: '#9AD8CC',
300: '#7DCDBD',
400: '#5FC1AE',
500: '#45B39D',
600: '#358B79',
700: '#266256',
800: '#163A32',
900: '#07110F',
950: '#000000'
},
water: {
DEFAULT: '#45B39D',
50: '#C6E9E2',
100: '#B8E4DB',
200: '#9AD8CC',
300: '#7DCDBD',
400: '#5FC1AE',
500: '#45B39D',
600: '#358B79',
700: '#266256',
800: '#163A32',
900: '#07110F',
950: '#000000'
},
Want results from more Discord servers?
Add your server