Support » Developing with WordPress » Edit Default Block Colors Or Add New Ones

  • Resolved iTesla

    (@itesla)


    Hello
    I m looking to edit the default colors of text when using block editor but also to add new ones, i have looked in WP CSS files but can’t find in which file they are located to customize per my needs, i did inspect element but not much info, maybe i not understand it well. Also would be good to make in such a way that a WP update does not erase them but this is optional not mandatory.

    Also it would be good to add contour color additional to the background and text color.
    I think contour color will be better than background, with the ability to change thickness of contour like in Adobe Illustrator or other apps.

    Hope someone can help, thanks.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello iTesla,

    At this location:/wp-content/plugins/dynamic-time/assets/time_min.css

    You will need some beautify and minimise to edit that file.

    Thread Starter iTesla

    (@itesla)

    Hello
    I need to edit core default text colors in block editor and add new ones, this is not plugin related.
    Anyway thanks.

    Moderator bcworkz

    (@bcworkz)

    You wouldn’t edit the core stylesheets, you would override the rules with theme editor styles.

    You shouldn’t really edit your theme files either, unless it’s a custom theme. To alter the appearance of distributed themes, create a child theme.

    Thread Starter iTesla

    (@itesla)

    Hello @bcworkz
    Not sure if you have understand what i want to do but here is a photo.

    Colors Image

    I need to edit those colors and per my suggestion WP team to add in future updates if possible a 3rd one ‘Text Contour Color’ and thickness adjust meter for it. 🙂

    The links you provide as i understand are to customize the UI of editor but i don’t need that.

    Thank You!

    Moderator bcworkz

    (@bcworkz)

    Ah, gotchya. A theme can override the default palette colors.
    https://developer.wordpress.org/block-editor/developers/themes/theme-support/#block-color-palettes

    I suspect it’s even possible to add another separate color palette for contours by modifying the block definition. Of course you can do so for custom blocks, I’m less sure about existing blocks. As it’s all React based I think it’s possible, but I personally don’t know how it would be accomplished.

    Thread Starter iTesla

    (@itesla)

    Good, but in which WP files are the codes for block palette can be found?
    I have looked in core CSS files but i did not find anything related to palette colors, after i do inspect element i get the feeling they are remotely loaded from some SVG file, maybe it’s the reason why i can’t find them, but i might be wrong.

    The contour color was only a suggestion, at the moment i need only to edit text and background colors and add new, but can’t seem to find where exactly, i will look into theme files, as i did not look there yet.

    Thank you.

    Thread Starter iTesla

    (@itesla)

    Ok i was able to override the Default colors using this code posted by GP theme developer.

    It looks similar to the one you gave link.
    Thank you now all is sorted out.

    Thread Starter iTesla

    (@itesla)

    Ok some update.
    I had an issue the colors would not apply on frontend, so i had to create codes for each color in style css as per my theme developer support.
    See this complete topic if anyone want to do same.

    • This reply was modified 5 months, 2 weeks ago by iTesla.
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.