Prev: attach a file
Next: DMAX with Criteria
From: PeterM on 15 Apr 2010 01:58 I have an AC2003 database that has a textbox with a backcolor. I need to dynamically change the backcolor value to a lighter shade of the textboxes current backcolor. After playing with the colorpicker in Access, I noticed that the Hue and Sat values remain constant, however the Lum increases when the shade gets lighter. I know how to specify the RGB values to determine the access color value. For example RGB(255,0,0) equals 255 for red and RGB(255,255,0) equals 65535 for yellow. I have a subroutine that converts any backcolor value to it's RGB equivalent. Since the users can specify the backcolor value I need a routine to determine the lighter shade because of the various colors the user can specify. Is there a method or procedure to determine the lighter shade of the color? I tried doing a search on LUM or SAT or HUE and got nowhere. Thanks!
From: Al Campagna on 15 Apr 2010 06:53 PeterM, Lum, Sat, and Hue are a function of the RGB values, so there's nothing to "control" through VB for those properties. With a Lum of 120, RGB(255,0,0) is bright red. With a Lum of 75 the RGB(159,0,0) is a darker brick red. By lowering the Red value in the RGB expression, you've lowered/controlled the Lum value. -- hth Al Campagna Microsoft Access MVP 2007-2009 http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "PeterM" <PeterM(a)discussions.microsoft.com> wrote in message news:88930F0D-E286-4470-932A-1217672CB90F(a)microsoft.com... >I have an AC2003 database that has a textbox with a backcolor. I need to > dynamically change the backcolor value to a lighter shade of the textboxes > current backcolor. After playing with the colorpicker in Access, I > noticed > that the Hue and Sat values remain constant, however the Lum increases > when > the shade gets lighter. I know how to specify the RGB values to determine > the access color value. For example RGB(255,0,0) equals 255 for red and > RGB(255,255,0) equals 65535 for yellow. I have a subroutine that converts > any backcolor value to it's RGB equivalent. Since the users can specify > the > backcolor value I need a routine to determine the lighter shade because of > the various colors the user can specify. > > Is there a method or procedure to determine the lighter shade of the > color? > I tried doing a search on LUM or SAT or HUE and got nowhere. > > Thanks!
|
Pages: 1 Prev: attach a file Next: DMAX with Criteria |