Jump to content
Our response time is longer than usual currently. We're working to answer users as quickly as possible and thank you for your continued patience.

Change spelling of hexa codes possible?


Recommended Posts

Hello community :1_grinning:

As I have learned, in CSS/HTML coding everything is written in small letters.
But the hexa codes in the color fields in designer/publisher are always shown with upper case letters.
So I copy that of course also into my CSS file.

This may be incomprehensible for some, but the hexadecimal codes in upper case letters disturb me massively in my CSS files. :34_rolling_eyes:

My teacher's not so happy about it either.
I'm currently manually adjusting the spelling of the hexadecimal codes - I don't want to get a worse grade because of that. :7_sweat_smile:

Does anyone know if I can change the spelling? I have already searched through all possible settings, but found nothing suitable.

Many thanks in advance!
Mimi

Link to comment
Share on other sites

No there is no way to set the letters to lower case from within the Affinity apps, unless you pasted to the workspace and changed the case of the letters and then copied to clipboard again.

 

iMac 27" Late 2019 Fully Loaded and running Monterey 12.6.1, iMac 27" Late 2013 running Catalina 10.15.7 - Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

I wonder, is it so bad to have uppercase letters colour hex code in CSS, I find it more legible than lowercase, is lowercase the norm for css coding or is it just personal taste?

iMac 27" Late 2019 Fully Loaded and running Monterey 12.6.1, iMac 27" Late 2013 running Catalina 10.15.7 - Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

It’s been a long time since I have written any CSS but I’m fairly sure that the upper/lower case issue is purely a personal – or organisational – choice. Mimi’s teacher might personally hate using upper case hex values but if Mimi goes to work for a company the practices of that company may specify that upper case is actually preferred (for whatever reason).
A good rule-of-thumb here would seem to be: Be consistent with the rest of the code base.
In other words, if you are writing it just for yourself then do whatever feels best for you, but if you have to work with other people, do what they do.

The W3C specification https://www.w3.org/TR/CSS2/syndata.html#characters states that “All CSS syntax is case-insensitive within the ASCII range (i.e., [a-z] and [A-Z] are equivalent), except for parts that are not under the control of CSS.” and the examples for colour hex values (section 4.3.6) are in both lower and upper case, so the W3C don’t seem to be too bothered about it.

Link to comment
Share on other sites

6 hours ago, GarryP said:

It’s been a long time since I have written any CSS but I’m fairly sure that the upper/lower case issue is purely a personal – or organisational – choice. Mimi’s teacher might personally hate using upper case hex values but if Mimi goes to work for a company the practices of that company may specify that upper case is actually preferred (for whatever reason).
A good rule-of-thumb here would seem to be: Be consistent with the rest of the code base.
In other words, if you are writing it just for yourself then do whatever feels best for you, but if you have to work with other people, do what they do.

The W3C specification https://www.w3.org/TR/CSS2/syndata.html#characters states that “All CSS syntax is case-insensitive within the ASCII range (i.e., [a-z] and [A-Z] are equivalent), except for parts that are not under the control of CSS.” and the examples for colour hex values (section 4.3.6) are in both lower and upper case, so the W3C don’t seem to be too bothered about it.

Thank Garry, I've noticed that a lot of apps; in fact the majority of apps, that can produce hex coded colour, do so in uppercase characters which leads me to believe this is the accepted method for hex colour code and lowercase is a matter of coding taste. I'd stay with uppercase hex colour code unless I was given a valid reason for lowercase, i.e compatibility etc but not "because I say so."

iMac 27" Late 2019 Fully Loaded and running Monterey 12.6.1, iMac 27" Late 2013 running Catalina 10.15.7 - Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

Yeah, all of the applications I can remember using displayed hex in upper case too. Some may not have but I just don’t remember them.
I’ve a feeling – unsubstantiated – that this could be because the APIs used have this as the default, and most decimal-to-hex conversion code I have seen uses upper case too. A web search for “decimal to hex” or “<any coding language> decimal to hex” shows the same, although there may be some exceptions.
Personally I used to write CSS with lower case hex values but that was only because I had read somewhere that it was the ‘proper’ way to do it, even though I preferred to see them in upper case as it made them a bit easier to find, for me at least.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.