Hex colors for events/change default colors

I’d like to be able to enter a specific hex code when changing an event color, as it’s difficult to consistently pick the same color twice from the color picker in order to coordinate the colors of similar events. Alternatively, is there a way to change the default selection of colors that appear when you click the button to change an event’s color? I’m colorblind, and many of the default options are hard to distinguish between. I don’t mind changing the site’s code if there’s no way to do this via the interface, but as of right know I don’t even know where in the code to look.

Unfortunately the iCalendar RFC restricts the value for COLOR to CSS3 color names. There’s an errata that fixes this, but it doesn’t seem very supported for now. There’s this issue on Github concerning the calendar implementation if you want to read a bit.

Thanks for the response, that’s a shame. Do you know where the default selection of colors for the color picker are in the source code? I’ve been searching through the github repo for the calendar app, but I can’t seem to find where the colors are specified, in order to hard-code a different set for the color-picker.

See this file, which uses the css-color-names npm package.

Hi tcit. Sorry for the noob question, but how does one use the color.js file you referenced? I’m sure it needs to go on the server but where? Are there any config changes in addition to placing the js file in the correct directory? Thanks!

Could you explain what you’re trying to do here?

Thanks tcit, but it seems that oc_calendars.calendarcolor only sets the default color for the calendar. I am trying to use a different color for each user. If I use the default color picked based on the users name, I end up with colors that are too similar and don’t contrast enough. See the screen cap below for an example. If I could use a dedicated hex value for each user that would help. Again, any other suggestions are welcome. Thank you for your time!

If you have access to the database, you can change the value for oc_calendars.calendarcolor for any calendar you want and set it to any hexadecimal color value.

Any help? I’m going to have to try a different solution if this isn’t resolved. I had to delete a previous comment and edit the one above since I had reached the 3 comment limit…