I have created two palette programs that will paste a RGBColor or a CMYKColor in any Mathematica notebook. The palettes have viewable color squares (2.2 in or 5.5 cm).
There are sliders for large changes, which instantaneously appear in the color squares , and plus-minus clickers for 0.001 incremental adjustments.
Opacity is disabled, but full variability can be enabled with a check.
Reopening the palettes will return them with their closing values, so there are reset buttons which will restore programmed settings.
The color squares touch the left and right edges of the palettes so that visual matching or contrasting is possible by moving the palettes anywhere on the monitor.
The palettes will place the selected color wherever the cursor is flashing in a notebook. And they can be modified or converted into other Mathematica color palettes
RGBColor Paster palette program
RGBColor Paster palette program
In[]:=
CreatePalette[PaletteNotebook[DynamicModule[{red=0,green=0,blue=0,opacity=1,useOpacity=False},Column[{Grid[MapThread[{Graphics[{#1,Rectangle[]},ImageSize->15],With[{i=#2},Manipulator[Dynamic[Switch[i,1,red,2,green,3,blue,4,If[useOpacity,opacity,1]],Switch[i,1,red=Round[#,.001],2,green=Round[#,.001],3,blue=Round[#,.001],4,If[useOpacity,opacity=Round[#,.001],Null]]&],{0,1,.001},ImageSize->Small,Appearance->"Open",AppearanceElements->{"InputField","StepLeftButton","StepRightButton"}]]}&,{{Red,Green,Blue,Opacity[opacity,LightGray]},Range[4]}]],Grid[{{Style["Check for Opacity",8,FontFamily->"Helvetica"],Checkbox[Dynamic[useOpacity],{False->"Opacity"}]}}],Dynamic[Graphics[{RGBColor[red,green,blue,If[useOpacity,opacity,1]],Rectangle[Scaled[{0,0}],Scaled[{1,1}]]},ImageSize->150]],Button["Paste RGBColor",NotebookWrite[InputNotebook[],"RGBColor["<>StringRiffle[ToString/@{red,green,blue}~Join~If[useOpacity,{opacity},{}],","]<>"]"]],Button["Reset",red=0;green=0;blue=0;opacity=1;useOpacity=False]},Center]],WindowTitle->"RGBColor Paster"]]
Out[]=
NotebookObject
CMYKColor Paster palette program
CMYKColor Paster palette program
In[]:=
CreatePalette[PaletteNotebook[DynamicModule[{cyan=0,magenta=0,yellow=0,black=0,opacity=1,useOpacity=False},Column[{Grid[MapThread[{Graphics[{#1,Rectangle[]},ImageSize->15],With[{i=#2},Manipulator[Dynamic[Switch[i,1,cyan,2,magenta,3,yellow,4,black,5,If[useOpacity,opacity,1]],Switch[i,1,cyan=Round[#,.001],2,magenta=Round[#,.001],3,yellow=Round[#,.001],4,black=Round[#,.001],5,If[useOpacity,opacity=Round[#,.001],Null]]&],{0,1,.001},ImageSize->Small,Appearance->"Open",AppearanceElements->{"InputField","StepLeftButton","StepRightButton"}]]}&,{{Cyan,Magenta,Yellow,Black,Opacity[opacity,LightGray]},Range[5]}]],Grid[{{Style["Check for Opacity",8,FontFamily->"Helvetica"],Checkbox[Dynamic[useOpacity],{False->"Opacity"}]}}],Dynamic[Graphics[{CMYKColor[cyan,magenta,yellow,black,If[useOpacity,opacity,1]],Rectangle[Scaled[{0,0}],Scaled[{1,1}]]},ImageSize->150]],Button["Paste CMYKColor",NotebookWrite[InputNotebook[],"CMYKColor["<>StringRiffle[ToString/@{cyan,magenta,yellow,black}~Join~If[useOpacity,{opacity},{}],","]<>"]"]],Button["Reset",cyan=0;magenta=0;yellow=0;black=0;opacity=1;useOpacity=False]},Center]],WindowTitle->"CMYKColor Paster"]]
Out[]=
NotebookObject
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
RGBColor paster and CMYKColor pasters palettes
by William Stockich
Wolfram Community, STAFF PICKS, February 27, 2024
https://community.wolfram.com/groups/-/m/t/3131435
by William Stockich
Wolfram Community, STAFF PICKS, February 27, 2024
https://community.wolfram.com/groups/-/m/t/3131435
