Skip navigation

avoiding the color hunt and peck

575 Views 8 Replies Latest reply: Jan 20, 2013 4:18 AM by Hiroto RSS
hotwheels 22 Level 1 Level 1 (0 points)
Currently Being Moderated
Jan 16, 2013 7:42 AM

when i have a row that is colored i oftentimes have text in one of the cells since i am using this as a sort of colored dividing line between different types of information. when i need to create a new colored row or when i need to change the color of a row that was cut and pasted from another area (say it already has the correct title in it) - i then need to MATCH the color that i was using for the other rows.

 

however, when i select the row and click on the color button at the top there is no way for me to know what color is being used by the other rows unless i select /those/ rows and do this. and even then i am oftentimes confused as to whether the orange is two rows over from the right and four rows up or if it is three rows over from the right and four rows up.

 

can anyone help me with this?

 

is there some kind of operation that lets me select one cell with the color and do a copy formatting and then select the whole row of the destination and do paste formatting that will get me the color without over writing the text?


TIA

MacBook Pro, OS X Mountain Lion (10.8.1), with 64 bit Win7 Boot Camp | iCloud
  • Jerrold Green1 Level 7 Level 7 (28,195 points)
    Currently Being Moderated
    Jan 16, 2013 9:19 AM (in response to hotwheels 22)

    Use the Color Well in the Colors Pane to store your favorite colors for future use. Put only a minimum number of your favorite colors there so you will be able to identify the ones you need. To add a color to the well, drag from the big patch at the top of the pane to the well. To use the well colors, just click on them.

     

    Screen Shot 2013-01-16 at 12.15.31 pm.png

     

    Jerry

  • Jerrold Green1 Level 7 Level 7 (28,195 points)
    Currently Being Moderated
    Jan 16, 2013 10:32 AM (in response to hotwheels 22)

    Whatever color you choose, by whatever means, shows up in the large rectangle of the Colors Pane. To add that color to the color well, just drag it from the big rectangle to the Color Well.

     

    Jerry

  • Jerrold Green1 Level 7 Level 7 (28,195 points)
    Currently Being Moderated
    Jan 16, 2013 1:50 PM (in response to hotwheels 22)

    When you have the Colors Pane open (View > Colors), and you assign a color with the Fill color tool, the color selected is repeated in the large rectangle in the Colors Pane.  Drag from the large rectangle to the well.

     

    Screen Shot 2013-01-16 at 12.15.31 pm.png

     

    Jerry

  • Badunit Level 6 Level 6 (10,765 points)
    Currently Being Moderated
    Jan 16, 2013 4:12 PM (in response to hotwheels 22)

    To match a color when you don't know what the color is and don't already have it in a color well, use the magnifying glass in the color window.

  • Hiroto Level 5 Level 5 (4,815 points)
    Currently Being Moderated
    Jan 20, 2013 4:18 AM (in response to hotwheels 22)

    Hello

     

    Here's a pair of AppleScript scripts which may help.

     

    Copy the codes listed below to two new documents (one per each) of AppleScript Editor, save them as compiled scripts, e.g., "fill colour - copy.scpt" and "fill colour - paste.scpt", in  ~/Library/Scripts/Applications/Numbers directory so that they appear in script menu in Numbers.

     

    Firstly, select source range (cells, rows or columns) with fill colour, call "fill colour - copy" script and it will get the fill colour of the first cell in the selected range and put the colour data in clipboard.

    Secondly, select target range (cells, rows or colums), call "fill colour - paste" script and it will set the fill colour of the selected range to the colour in the clipboard.

     

    Known limitation is that it cannot copy fill colour 'none' due to a flaw in scripting interface of Numbers 09.

     

    Tested with Numbers 2.0.5 under OS X 10.5.8.

     

    Good luck,

    H

     

     

    1) fill colour - copy.applescript

     

    (*
        copy background color to clipboard
        
        * this script will copy the fill colour of the first cell in the selected range.
        * this script cannot copy the fill colour 'none', which is denoted by / in fill colour grid.
    *)
    tell application "Numbers"
        tell my _selection(document 1)'s range
            if it is missing value then return
            set c to background color
        end tell
    end tell
    try
        set the clipboard to c as RGB color
    on error number -2753 -- variable c is not defined, in case background color is none
        display dialog "Fill colour is none" with icon 2 giving up after 10
        return
    end try
    
    on _selection(doc)
        (*
            reference doc : target document
            return record : {range:_range, table:_table, sheet:_sheet}
                _range = reference to named range in selection
                _table = table object to which selection range belongs
                _sheet = sheet object to which selection range belongs
        *)
        (*
            Limitation
                Numbers allows to select uncontinuous regions
                but its scripting interface does not provide decent method to retrieve them.
            
                If uncontinuous regions are selected, 'selection range' returns the minimum continuous region
                which includes all the regions in selection.
        *)
        script o
            property parent : {}
            property pp : {}
            local q, r, s, _range, _table, _sheet
            tell application "Numbers"
                set pp to doc's every sheet's every table's selection range as list
                repeat with p in my pp -- per sheet
                    set q to p's every reference -- retrieve object (filtering out missing value)
                    if q ≠ {} then
                        set q to q's item 1 -- selection range object [1]
                        set r to q as record -- selection range object specifier record [2]
                        set _table to r's every reference's item 1 -- container table reference [3]
                        set s to (a reference to _table's selection range) -- selection range reference [4]
                        set _range to (a reference to _table's range (s's name)) -- named range reference [5]
                        set _sheet to (_table as record)'s every reference's item 1 -- container sheet reference [3]
                        return {range:_range, table:_table, sheet:_sheet}
                    end if
                end repeat
                return {range:missing value, table:missing value, sheet:missing value}
            end tell
            (*
                [1] class specifier for 'range' is broken in Numbers 09
                [2] «class want» value is broken in Numbers 09
                [3] simple method to get «class from» value without asking for «class from» key which causes trouble in recompilation of the token 'from'.
                [4] proper reference of selection range object
                [5] proper reference of named range object
            *)
        end script
        tell o to run
    end _selection
    

     

    2) fill colour - paste.applescript

     

    (*
        paste background color from clipboard
        
        * this script expects the clipboard contains RGB color data.
    *)
    try
        set c to the clipboard as RGB color
    on error number -1700
        display dialog "Colour not found in clipboard" with icon 2 giving up after 10
        return
    end try
    tell application "Numbers"
        tell my _selection(document 1)'s range
            if it is missing value then return
            set background color to c
        end tell
    end tell
    
    on _selection(doc)
        (*
            reference doc : target document
            return record : {range:_range, table:_table, sheet:_sheet}
                _range = reference to named range in selection
                _table = table object to which selection range belongs
                _sheet = sheet object to which selection range belongs
        *)
        (*
            Limitation
                Numbers allows to select uncontinuous regions
                but its scripting interface does not provide decent method to retrieve them.
            
                If uncontinuous regions are selected, 'selection range' returns the minimum continuous region
                which includes all the regions in selection.
        *)
        script o
            property parent : {}
            property pp : {}
            local q, r, s, _range, _table, _sheet
            tell application "Numbers"
                set pp to doc's every sheet's every table's selection range as list
                repeat with p in my pp -- per sheet
                    set q to p's every reference -- retrieve object (filtering out missing value)
                    if q ≠ {} then
                        set q to q's item 1 -- selection range object [1]
                        set r to q as record -- selection range object specifier record [2]
                        set _table to r's every reference's item 1 -- container table reference [3]
                        set s to (a reference to _table's selection range) -- selection range reference [4]
                        set _range to (a reference to _table's range (s's name)) -- named range reference [5]
                        set _sheet to (_table as record)'s every reference's item 1 -- container sheet reference [3]
                        return {range:_range, table:_table, sheet:_sheet}
                    end if
                end repeat
                return {range:missing value, table:missing value, sheet:missing value}
            end tell
            (*
                [1] class specifier for 'range' is broken in Numbers 09
                [2] «class want» value is broken in Numbers 09
                [3] simple method to get «class from» value without asking for «class from» key which causes trouble in recompilation of the token 'from'.
                [4] proper reference of selection range object
                [5] proper reference of named range object
            *)
        end script
        tell o to run
    end _selection
    

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.