Home > Community > Forums > PCB SKILL > Skill Code to change the Colors on the Color Palette

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Skill Code to change the Colors on the Color Palette 

Last post Tue, Sep 3 2013 2:46 AM by PAVANRKS. 3 replies.
Started by jmwilk 04 Oct 2012 02:49 PM. Topic has 3 replies and 1765 views
Page 1 of 1 (4 items)
Sort Posts:
  • Thu, Oct 4 2012 2:49 PM

    • jmwilk
    • Not Ranked
    • Joined on Fri, Oct 10 2008
    • Posts 9
    • Points 135
    Skill Code to change the Colors on the Color Palette Reply

    Hi All,

     

    Does anyone have any sample code for changing the colors on the color palette....?

     

    JMWilk

    • Post Points: 20
  • Thu, Oct 4 2012 3:18 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 744
    • Points 16,115
    Re: Skill Code to change the Colors on the Color Palette Reply
    This code might help you: 
     
    defun( DE_setLayerColour (layer, colour))
     let((colourNo, colours, n, p)
    cond(
    (numberp(colour), colourNo = colour)
    (!colour, nil)
    (t
    colours = '(
    (White 255 255 255)
    (LtBlue 014 210 255)
    (Rose 255 121 203)
    (Green 000 255 106)
    (Purple 166 016 255)
    (Teal 121 153 196)
    (Red 255 000 000)
    (Yellow 255 255 000)
    (Blue 000 000 255)
    (Aqua 055 247 215)
    (Gray 179 179 185)
    (Olive 116 196 143)
    (Orange 252 199 046)
    (Pink 255 178 255)
    (Beige 172 138 138)
    (Navy 002 168 213)
    (Violet 176 000 206)
    (Gold 234 190 000)
    (Silver 217 224 224)
    (Rust 242 127 134)
    (Lime 014 249 182)
    (Brown 161 004 004)
    (Mauve 224 141 202)
    (Black 000 000 000)
    )
    n = listnindex(mapcar(lambda((colDef), lowerCase(car(colDef))), colours), lowerCase(colour))
    when(n, colourNo = n + 1, axlColorSet(colourNo, cdr(nth(n, colours))))
    )
    )
    when(colourNo, p = axlLayerGet(layer), p ->color = colourNo, axlSetParam(p))
    ))
    Dave Elder, Tait Communications
    • Post Points: 35
  • Mon, Oct 8 2012 12:48 PM

    • jmwilk
    • Not Ranked
    • Joined on Fri, Oct 10 2008
    • Posts 9
    • Points 135
    Re: Skill Code to change the Colors on the Color Palette Reply

     Hi Dave,

     

    Thanks again this function works perfectly...

     

    JMWilk

    • Post Points: 5
  • Tue, Sep 3 2013 2:46 AM

    • PAVANRKS
    • Top 500 Contributor
    • Joined on Tue, Sep 3 2013
    • Bengaluru, Karnataka
    • Posts 24
    • Points 485
    Re: Skill Code to change the Colors on the Color Palette Reply
    Hi Dave,

    I'm PCB designer (Beginer), I want learn the Skill coding. I have following your post from many days i'm using your skill files all file working fine,But i'm not getting what you wrote.Please help me to learn. Like which documents need to read,

    Good Day,

    Pavan Kumar Kulkarni
    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by jmwilk at 04 Oct 2012 02:49 PM. Topic has 3 replies.