Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS How to extract colours from SCSS file

meetdilip

Well-Known Coder
I would like to have the colours from this SCSS file.


Is there any method so that I can actually have the hex codes as we see in here

84801339-e5585680-afb3-11ea-8743-29647ff3f3a9.png
 
Last edited:
Yes. I am aware of it. But picking colours from an image is less accurate. Since we have the _variables.scss and the whole source library, it will be better if I can compile _variable.scss into CSS. Sadly, when I compile it after adding missing mixins, I get a blank file. :(

I just need to compile one file, that's all.

Thanks for your tip though.
 
Yes. I am aware of it. But picking colours from an image is less accurate. Since we have the _variables.scss and the whole source library, it will be better if I can compile _variable.scss into CSS. Sadly, when I compile it after adding missing mixins, I get a blank file. :(

I just need to compile one file, that's all.

Thanks for your tip though.
Ahh okay, sorry I couldn't be of help.

@Ghost any idea?
 
I have done this before. _variables.scss need 2 mixins added to it. And when we compile, it will be through. It worked in the previous version. But this time, it is not giving proper output, only plain file. Thanks.
 
You need an output file, any name. Say yoda.scss. Then import _variables.scss to it and call the classes to it. ie,

.blue { background: $blue; }

Now when you process the SCSS file, there will be a yoda.css which has the hex code for $blue in it.
 
You need an output file, any name. Say yoda.scss. Then import _variables.scss to it and call the classes to it. ie,

.blue { background: $blue; }

Now when you process the SCSS file, there will be a yoda.css which has the hex code for $blue in it.
And by importing how is this done with .css? Is it like #include _variables.scss?
 
Yes. Both _variables.scss and yoda.scss should be in the same folder. That is how I did. It is possible that there are other methods.
Can you please show a code example and explanation of how you found it so it can be marked as solution? It will help many others who have the same problem
 

Buy us a coffee!

Back
Top Bottom