How use a personal color ?



  • How use a personal color ?

    my common.variables.styl :

    $primary   = #f07f0A
    $secondary = #303f47
    $tertiary  = #555
    $myColor = #f4ba7f
    

    my app.styl (css) :

    @import '~variables'
    .text-myColor
      color $myColor
    .bg-myColor
      background-color $myColor
    

    for style css and use on my pages it’s ok

    in my page :

    import { colors } from 'quasar'
    
    let primaryColor = colors.getBrand('primary') 
    let myColor = colors.getBrand('myColor') 
    
    console.log(primaryColor) => ok return #f07f0A
    console.log(myColor) => not ok return null
    

    if change my code :

    colors.setBrand('myColor','#f4ba7f')
    let primaryColor = colors.getBrand('primary') 
    let myColor = colors.getBrand('myColor') 
    
    console.log(primaryColor) => ok return #f07f0A
    console.log(myColor) => not ok return #f4ba7f
    

    But I again need to declare the color for $myColor
    It is possible to get back the color of myColor directly of the file common.variables ?

    thanks,