Edano Posted May 18, 2013 Share Posted May 18, 2013 (edited) Extended Color Mixer i want to share one of my little helpers. - what does it do ? RGB color system is the mathematical description of colors, so to say, it explains colors (a sensual impression) to a machine. in contrast to that, the human eye interprets colors in the HSL (hue-saturation-luminance) matrix. these two systems are not much compatible. if you want to use "neighbour" colors in a gui, or very distant colors for more contrast (e.g. in games), the tuning on the Red-Green-Blue scale rarely returns satisfying results and it is very hard to compare colors to find out the most suitable. so i took the well known windows colorpicker, which uses HSL system, and extended it. the HSL square displays colors according to the hue on the horzontal and saturation on the vertical axis. the luminance is the "third dimension" slider to the right of it. so, HSL is a 3D model of colors, while RGB is 2 dimensional, a triangle with Red Green and Blue at the edges. i amended sliders for the RGB color scale on the right to the colorpicker window. the color you pick is displayed in the central "base color" label. to the bottom of the window i added an array in which related colors to the base color will be created. basically you have to choose if you want to create similar or "distant" colors to the base color. you can choose a threshold that represents the min/max distance to the base color. additionally, you can choose the standard for the distance calculation. the euclidean distance simply is the spacial distance in the RGB room. the industry defined some weighting standards of the colors to fit better to the human eye's sensation (NTSC, HDTV, HSP a.o.). additionally you can set up saturation and luminance filters to precise your search. the mixer puts the chosen color in Hexcode into your clipboard. if you keep the ctrl button pressed, all colors you pick will be collected. you can toggle the clipboard function off by clicking on the clipboard statusbar label, and restore your old clipboard content. the two buttons "Collect All" and "OK" have no function that i know of, it is an "unfinished project" now you can try it out and play around. i have often used the modified "Shades()" function in other scripts to create desired colors within a program. feel free to use the algorithms. . taken down. Edit: screenshot Edited August 16, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
jaberwacky Posted May 19, 2013 Share Posted May 19, 2013 There might be a bug. Local $nH,$nS,$nB,$nR=$t[0]/255,$nG=$t[1]/255,$nB=$t[2]/255,$nMax=$nR,$nMin=$nR $nB is declared and then initialized further down the line. Should $nB be $nL? Local $nH ,$nS, $nL, $nR = $t[0] / 255, $nG = $t[1] / 255, $nB = $t[2] / 255, $nMax = $nR, $nMin = $nR Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
czardas Posted May 19, 2013 Share Posted May 19, 2013 (edited) It looks very good. Thanks for the in depth explanations. Edited May 19, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Edano Posted May 19, 2013 Author Share Posted May 19, 2013 There might be a bug. Local $nH,$nS,$nB,$nR=$t[0]/255,$nG=$t[1]/255,$nB=$t[2]/255,$nMax=$nR,$nMin=$nR $nB is declared and then initialized further down the line. Should $nB be $nL? Local $nH ,$nS, $nL, $nR = $t[0] / 255, $nG = $t[1] / 255, $nB = $t[2] / 255, $nMax = $nR, $nMin = $nR yes, you maybe right. in fact, this function is not used in the script, i commented all the referring lines out. i left it there for future use ... or not [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
wakillon Posted May 19, 2013 Share Posted May 19, 2013 I have made similar tool about shades : Take a look to Shades Tab of Control's ToolTip will help you. Thanks to share. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
guinness Posted May 19, 2013 Share Posted May 19, 2013 Have you considered making this into a UDF? UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Edano Posted May 19, 2013 Author Share Posted May 19, 2013 (edited) Have you considered making this into a UDF? . yes indeed. you found that in my comments ? i wrote it two years ago and i gave up the idea. you are so strict with your UDF requirements .... Edit: something like _Color_GetShade ( $iBaseColor, $iDistance, $iMode=1, $iSaturation=-1, $iLuminance=-1 ) or _Color_GetDistance ( $iColor1, $iColor2, $iMode=1 ) feel free to use it Edited May 19, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
guinness Posted May 19, 2013 Share Posted May 19, 2013 . you are so strict with your UDF requirements .... Not me surely?! If you need advice or help then let me know what I can do. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now