Board index » cppbuilder » which colors for a frame3d ?
Giovanni Resta
CBuilder Developer |
which colors for a frame3d ?2003-11-18 05:22:58 PM cppbuilder103 Hi, maybe this will seem a little stupid, but... I want to represent small square tiles (in green, red, yellow, blue and dark gray) on a light gray background. I would like to add a little 3d effect and I've seen that maybe the Drame3D function can help: Frame3D(Graphics::TCanvas * Canvas, Windows::TRect &Rect, Graphics:: TColor TopColor, Graphics::TColor BottomColor, int Width); That function draws a 3d rectangular frame using two given colors. To obtain a 3d effect I have to fill the square with my color and then call frame3d with a lighter and a darker color. Now the question: is there a mathematical formula to compute (in a consistent way across tiles of different colors) the rgb components of a ligher and darker color of a given color? Thanks, g. |