question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No settings option to output uppercase hex colors

See original GitHub issue

Please read and fill out this template by replacing the instructions with appropriate information. If the template is not followed, the issue will be marked Invalid and closed.

Before submitting an issue search past issues and read the area of the documentation related to your specific question, issue, or request.


Description

… what is the issue / request ?

#74 was an issue with "upper_case_hex": true not working in the 2.x series, and it was fixed by 4d03c04. However, that code seems to have been completely removed in 3.x. I fixed it by editing line 62 in custom/ahex.py to the following:

template = "#{:02X}{:02X}{:02X}{:02X}" if show_alpha else "#{:02X}{:02X}{:02X}"

(changing the lowercase {:02x}s to {:02X}).

This won’t work for everyone, as it now forces all hex output to be uppercase. Adding extra code to look for "upper_case_hex" in the settings as well as in the parameters passed to the function hopefully won’t be too difficult, I just haven’t had a chance to do it yet.

Vague issues/requests will be marked with Insufficient Details for about a week. If not corrected, they will be marked Stale for about a week and then closed.

For feature requests or proposals:

  • Clearly define in as much detail as possible how you imagine the feature to work.
  • Examples are also appreciated.

For bugs and support questions:

  • Describe the bug/question in as much detail as possible to make it clear what is wrong or what you do not > understand.
  • Provide errors from console (if available).
  • Pictures or screencasts can also be used to clarify what the issue is or what the question is.
  • Provide links to 3rd party syntax highlighting package you are using if applicable.

Support Info

Run the following command from the menu: Preferences->Package Settings->ColorHelper->Support Info. Post the result here.

  • ST ver.: 4099
  • Platform: windows
  • Arch: x64
  • Plugin ver.: 3.3.1
  • Install via PC: True
  • mdpopups ver.: 4.1.1
  • markdown ver.: 3.2.2
  • pygments ver.: 2.1a0
  • jinja2 ver.: 2.10.1

Steps to Reproduce Issue

  1. First step…
  2. Second step…
  3. Third step…

Provide steps to reproduce the issue. Pictures are fine, but also provide code/text I can copy and paste in order to reproduce. Omit for feature requests and feature proposals.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
facelessusercommented, Apr 1, 2021

No not removed, just different.

Here we override the css-level-4 color class options to export hex with uppercase.

    "user_color_classes": {
        "css-level-4": {
            "output": [
                {"space": "srgb", "format": {"hex": true, "upper": true}}, // <--- make hex upper case
                {"space": "srgb", "format": {"comma": true}},
                {"space": "hsl", "format": {"comma": true}},
                {"space": "hwb", "format": {"comma": false}},
                {"space": "lch", "format": {"comma": false}},
                {"space": "lab", "format": {"comma": false}},
                {"space": "display-p3", "format": {}},
                {"space": "rec2020", "format": {}},
                {"space": "prophoto-rgb", "format": {}},
                {"space": "a98-rgb", "format": {}},
                {"space": "xyz", "format": {}}
            ]
        }
    },

@gir-bot remove s: triage @gir-bot add T: support

0reactions
MattDMocommented, Apr 1, 2021

OK, I got it. It was an issue with braces in my settings, the "sublime_colormod" key ended up syntactically being outside of "user_color_classes". It’s working great now, thanks!

I’ll check out #182 when I get a chance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Color Picker: hex color format settings #32376 - GitHub
Currently, Color Picker can only output colors in uppercase 6-digit format. This may be in conflict with linting rules for a project.
Read more >
How to Set Custom Color Palette Code (in Hexadecimal Value ...
Answer. Use the preferences file to add the custom color. For RGB format: rgb(0,0,0) -- Lower case, should not be upper case.
Read more >
Is there a reason to use uppercase letters for hexadecimal ...
It looks like using lowercase values does the same, and, CSS values for colors are not case-sensitive.
Read more >
Xamarin.Forms Entry - Microsoft Learn
This article explains how to use the Xamarin.Forms Entry class to accept single-line text or password input in an application.
Read more >
Options - Froala
An array of colors used in the colors popup for background. Passing REMOVE as a value in the array will display the Clear...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found