Colors

MaterialSB provides color constants that map to MaterializeCSS color classes. Colors can be used for backgrounds, text, and component styling.

Base Colors

These constants represent the base Material Design color palette:

ConstantColorPreview
#Color_RedredRed
#Color_PinkpinkPink
#Color_PurplepurplePurple
#Color_DeepPurpledeep-purpleDeep Purple
#Color_IndigoindigoIndigo
#Color_BlueblueBlue
#Color_LightBluelight-blueLight Blue
#Color_CyancyanCyan
#Color_TealtealTeal
#Color_GreengreenGreen
#Color_LightGreenlight-greenLight Green
#Color_LimelimeLime
#Color_YellowyellowYellow
#Color_AmberamberAmber
#Color_OrangeorangeOrange
#Color_DeepOrangedeep-orangeDeep Orange
#Color_BrownbrownBrown
#Color_GreygreyGrey
#Color_BlueGreyblue-greyBlue Grey
#Color_BlackblackBlack
#Color_WhitewhiteWhite
#Color_TransparenttransparentTransparent
Color Modifiers

Append these modifiers to base colors to adjust lightness or saturation:

ModifierEffect
#Color_Lighten_1 to #Color_Lighten_5Progressively lighter shades (5 is lightest)
#Color_Darken_1 to #Color_Darken_4Progressively darker shades (4 is darkest)
#Color_Accent_1 to #Color_Accent_4Accent/vibrant variants
Text Color Modifier

To apply a color to text instead of background, append #Color_Text:

ModifierUsage
#Color_TextConverts background color to text color (appends "-text" to class)
Usage Examples
; Basic color usage
MaterialSB::Append(MaterialSB::Paragraph("Red text", MaterialSB::#Color_Red))

; Color with modifier
MaterialSB::Append(MaterialSB::Header("Light blue header", 4, MaterialSB::#Color_Blue + MaterialSB::#Color_Lighten_2))

; Dark variant
MaterialSB::Toast("Error occurred!", 4000, MaterialSB::#Toast_Default, MaterialSB::#Color_Red + MaterialSB::#Color_Darken_2)

; Accent color
MaterialSB::AddClass(myElement, MaterialSB::#Color_Pink + MaterialSB::#Color_Accent_2)

; Text color (for use with AddClass on elements)
MaterialSB::AddClass(myElement, MaterialSB::#Color_Teal + MaterialSB::#Color_Text)
Example with Variations
Procedure Main(Success)
  If Success
    MaterialSB::Row(MaterialSB::#Grid_Container)
      MaterialSB::Col(12)
        ; Show color variations
        MaterialSB::Append(MaterialSB::Header("Blue Variations", 4))
        
        MaterialSB::Append(MaterialSB::Paragraph("Lighten 5", MaterialSB::#Color_Blue + MaterialSB::#Color_Lighten_5))
        MaterialSB::Append(MaterialSB::Paragraph("Lighten 3", MaterialSB::#Color_Blue + MaterialSB::#Color_Lighten_3))
        MaterialSB::Append(MaterialSB::Paragraph("Base Blue", MaterialSB::#Color_Blue))
        MaterialSB::Append(MaterialSB::Paragraph("Darken 2", MaterialSB::#Color_Blue + MaterialSB::#Color_Darken_2))
        MaterialSB::Append(MaterialSB::Paragraph("Darken 4", MaterialSB::#Color_Blue + MaterialSB::#Color_Darken_4))
        MaterialSB::Append(MaterialSB::Paragraph("Accent 2", MaterialSB::#Color_Blue + MaterialSB::#Color_Accent_2))
        
      MaterialSB::CloseCurrentParent()
    MaterialSB::CloseCurrentParent()
  EndIf
EndProcedure

MaterialSB::Download(@Main())
See Also

Paragraph(), Header(), Toast(), AddClass()