Skip to content

coloralpha #531

Closed
Closed
@yukulele

Description

@yukulele

hi,
I suggest a 'coloralpha' function to add alpha channel to color :

exemple :

LESS input :

body
{
     background-color : coloralpha(#ffcc00 , 0.5);
     color : coloralpha(blue , 0.3);
}

CSS output :

body
{
     background : rgba(255 , 204 , 0 , 0.5);
     color : rgba(0 , 0 , 255 , 0.3
}

actualy I need to do this ugly workaround :

body
{
     @col:#ffcc00
     background : hsla(hue(@col) , saturation(@col) , lightness(@col) , 0.5);
     color : hsla(hue(red) , saturation(red) , lightness(red) , 0.5);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions