mk0r
January 26, 2025, 5:41am
1
I have a new discourse installation and created scaffolding for a new theme. First thing was I edited the color scheme to use a scheme called Flexoki. You can see here:
{
"name": "Psychomotor",
"component": false,
"license_url": null,
"about_url": null,
"authors": "Michael",
"theme_version": null,
"minimum_discourse_version": null,
"maximum_discourse_version": null,
"assets": {},
"color_schemes": {
"Flexoki Light": {
"primary": "#100F0F",
"secondary": "#FFFCF0",
"tertiary": "#205EA6",
"quaternary": "#AF3029",
"header_background": "#F2F0E5",
"header_primary": "#6F6E69",
"highlight": "#ECCB60",
"danger": "#AF3029",
This file has been truncated. show original
I’ve added and selected the theme via GitHub on my discourse instance but none of the color settings are reflected, instead I just see the default colors listed, for both Flexoki Light and Dark. Any help troubleshooting?
1 Like
Yep so there’s a few things to check first:
Make sure your theme has that particular color palette selected:
If that setting is correct but it’s still showing the wrong color palette, make sure that your profile settings doesn’t have the wrong color palette selected:
4 Likes
mk0r
January 26, 2025, 7:28am
3
thanks, neither of those are the issue. As the screenshot shows, the ui is showing the flexoki theme as being just the default discourse colors. somehow the palette is not being interpreted at all
1 Like
Heliosurge
(Dan DeMontmorency)
January 26, 2025, 7:52am
4
I might be seeing things. But moving back and forth it looks like the color palette you uploaded is a copy of light
Goto Theme and select something with a different looking palette and try switching to that color palette.
Ah, I see what you mean now. So Discourse is not reading these colors:
"color_schemes": {
"Flexoki Light": {
"primary": "#100F0F",
"secondary": "#FFFCF0",
"tertiary": "#205EA6",
"quaternary": "#AF3029",
"header_background": "#F2F0E5",
"header_primary": "#6F6E69",
"highlight": "#ECCB60",
"danger": "#AF3029",
The issue is above – it’s not using the colors listed in the file^^
1 Like
Heliosurge
(Dan DeMontmorency)
January 26, 2025, 8:53am
6
Is there maybe an issue then with the file layout? Causing it to defaults?
It might be best to simply create a new color palette within Discourse entering these values rather than importing the theme.git
I looked at the syntax of the file. In my previous color palette scheme, it doesn’t have #
in each hexadecimal string.
"license_url": "https://github.com/t1-tracey/arctic-sunrise-theme/blob/master/LICENSE",
"about_url": "https://github.com/t1-tracey/arctic-sunrise-theme",
"authors": null,
"theme_version": null,
"minimum_discourse_version": null,
"maximum_discourse_version": null,
"assets": {
},
"color_schemes": {
"Arctic Sunrise": {
"primary": "222222",
"secondary": "ffffff",
"tertiary": "6eb5c1",
"quaternary": "ffccbb",
"header_background": "E2e8e5",
"header_primary": "333333",
"highlight": "ffccbb",
"danger": "e43535",
"success": "009900",
"love": "fa6c8d"
}
If you change each of the hexadecimal strings to not have #
at the start, I think it might parse correctly.
"component": false,
"license_url": null,
"about_url": null,
"authors": "Michael",
"theme_version": null,
"minimum_discourse_version": null,
"maximum_discourse_version": null,
"assets": {},
"color_schemes": {
"Flexoki Light": {
"primary": "#100F0F",
"secondary": "#FFFCF0",
"tertiary": "#205EA6",
"quaternary": "#AF3029",
"header_background": "#F2F0E5",
"header_primary": "#6F6E69",
"highlight": "#ECCB60",
"danger": "#AF3029",
"success": "#66800B",
"love": "#A02F6F",
"primary-very-low": "#F2F0E5",
This is also the case in the example guide for Discourse color schemes:
Discourse now supports importing color schemes from remote repository. Here I will demonstrate how you would go about doing this.
Navigate to colors and add a color scheme.
Head to /admin/customize/colors on your site and create a color scheme.
[image]
Tips:
I used a chrome plugin (color picker ) to select colors from an existing image of a palette on the web.
If you create a theme, assign the color scheme to the theme and preview it, changes will be reflected live.
Create a new …
{
"name" : "Solarized",
"about_url" : "https://github.com/SamSaffron/discourse-solarized",
"license_url": "https://github.com/SamSaffron/discourse-solarized/blob/master/LICENSE",
"color_schemes": {
"Solarized Light": {
"primary": "586E75",
"secondary": "EEE8D5",
"tertiary": "268BD2",
"quaternary": "CB4B16",
"header_background": "002B36",
"header_primary": "93A1A1",
"highlight": "B58900",
"danger": "CB4B16",
"success": "859900",
"love": "DC322F"
}
}
}
7 Likes
mk0r
January 26, 2025, 6:00pm
8
ah!! thank you! will try this fix shortly, seems like the sure answer.
2 Likes