Sign in to follow this  
Followers 0
kjactive

SysColor UDF

1 post in this topic

#1 ·  Posted (edited)

SysColor UDF - a SystemColors class function library...

.Get color values from Windows® display elements.

.Convert color values in between Hex, RGB and CSS.

.Derives color values based on Html methodes.

.Calculate a percentage between two colors into an array.

The SysColor UDF is a low level library with functions that interface with the activex component 'SysColorCtrl.SysColorCtrl' from the library Cic.dll that is part of Microsoft® Windows® Operativsystem. This udf is tested on Win2K, WinXP and as Cic.dll is part of the Vista Operativsystem, should function too but never tested...

There's a lot of Global variables initiated at scripting runtime that all starts with $SYSCOLOR_ , each property of the SystemColors class is a Color structure that is the color of a Windows display element, these can be manuallly updated with the function _GetSysColorProperties(). There is one special Global Constant Array $SysColor_CSS containing 28 pre-defined color values of the CSS class, each property is a preset Color structure that is a color of Windows display elements...

Functions:

_GetSysColorProperties()

_SplitFromRGB($iColor)

_ConvertHexToRGB($iColor)

_ConvertRGBToHex($iColor)

_GetDerivedHex($iColor1,$iColor2,$iProcent,$sFormat='CSS')

_GetDerivedRGB($iColor1,$iColor2,$iProcent,$sFormat='CSS')

_GetQuarterColor($iColor,$iMode)

_Get3QuarterColor($iColor,$iMode,$sFormat='CSS')

_GetHalfColor($iColor,$mode,$Format='CSS')

_GradientColorArray($iColor1,$iColor2,$iFrom=0,$iTo=100,$Format='CSS')

Most functions work on RGB, Hex and the CSS color values and do calculatings in between ...

Attached is a User Defined Function Reference in autoit3 style...

Download from site:

http://www.sitecenter.dk/latenight/nss-fol...Color%20UDF.zip

Kåre Johansson

Edited by kjactive

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0