Created
          October 19, 2012 03:04 
        
      - 
      
- 
        Save karlstolley/3916003 to your computer and use it in GitHub Desktop. 
    RGB/RGBa in Sass
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Declare the color as RGB; SASS will treat this as hex | |
| $green: rgb(27,224,63); | |
| // Declare an alpha | |
| $alpha: .5; | |
| // Declare another color variable as a color with an alpha | |
| $greenAlpha: rgba($green, $alpha); | |
| body { | |
| /* As RGB (which SASS actually ouputs as HEX) */ | |
| background: $green; | |
| /* With RGBa syntax */ | |
| background: rgba($green, $alpha); | |
| /* Or as a simple variable with RGBa */ | |
| background: $greenAlpha; | |
| } | 
thanks
Thanks !
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Thanks bro!