Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
36
Comments
1

Rashid Shamloo

@rashidshamlooIran570 points

Developer, Programmer, Avid Learner

I’m currently learning...

React.js, Next.js, Tailwind CSS, Bootstrap 5, Material UI

Latest solutions

Latest comments

  • Lim Tangmeng•80
    @ImFropZ
    Submitted over 2 years ago

    Results Summary Component

    #bem#sass/scss
    2
    Rashid Shamloo•570
    @rashidshamloo
    Posted over 2 years ago

    There is no native function to do that in CSS. but in SASS/SCSS you can use the "rgba" function to add alpha to a color variable:

    $clr-red: hsl(0, 100%, 50%);
    
    main {
      background-color: rgba($clr-red, 0.5);
    }
    

    To see a list of other SASS color functions click here

    Marked as helpful
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub