阅读 116

颜色表大全及配色方案,色盘24色环配色

我一直想制作色盘,通过编程生成,但是无奈技术不够。 最后的功夫一定是不负责任的人。

emptybitmapbmpcreate=new bitmap (640,640 ); //创建空图pBoxA.Image=bmpcreate; //提交给控件,自动创建Image格式的数据graphicsmygraphicsc=graphics.from image (pboxa.image )//操作指定的对象,并绘制在控件的图上pBoxA.Image和curBitmap是两个不同的对象my graphicsc.smoothing mode=smoothing mode.antialias; mypen=newpen (选择颜色; //画线笔颜色color.fromname(black ) ) system.drawing.color.redmygraphicsc.fill rectangle (brushes.white,Pboxa . int中心点y=pBoxA.Height/2; intr=math.min(Pboxa.width,pBoxA.Height ); my graphicsc.draw ellipse (mypen=newpen (color.from argb ) 255,255 ) )、new Rectangle )中心点x - R/2、中心点y - R/2 ////刷子if(Pboxa.HeightPboxa.width ) intr=255,b=255,g=255; for(intI=0; i=510; I//红-紫-蓝(if ) I255 ) { r=255; b=i; } else { r=510-i; b=255; } my brush=new system.drawing.solid brush (color.from argb (r,0,b ) ); //mygraphicsc.fillpie(mybrush,0,(pBoxA.Height - pBoxA.Width )/2,r,- 60i * 120/510,85-I/6 ) ) i=510; I//蓝-青-绿(if ) I255 ) { b=255; g=i; } else { b=510 - i; g=255; } my brush=new system.drawing.solid brush (color.from argb (0,g,b ) ); //mygraphicsc.fillpie(mybrush,0,(pBoxA.Height - pBoxA.Width )/2,r,r,60i * 120/510,85-I/6 ); }for(intI=0; i=510; I//绿色-黄色-红色(if ) I255 ) { g=255; r=i; (else ) g=510-I; r=255; } my brush=new system.drawing.solid brush (color.from argb (r,g,0 ) ); //mygraphicsc.fillpie(mybrush,0,(pBoxA.Height - pBoxA.Width )/2,r,r,180 I * 120/510,85-I/6 ); } } else { int r=255,b=255,g=255; for(intI=0; i=510; I//红-紫-蓝(if ) I255 ) { r=255; b=i; } else { r=510 - i; b=255; } my brush=new system.drawing.solid brush (color.from argb (r,0,b ) ); //mygraphicsc.fillpie(mybrush,(pBoxA.Width - pBoxA.Height )/2,0,r,r,0i * 120/510,85-I/6 ); }for(intI=0; i=510; I//蓝-青-绿(if ) I255 ) { b=255; g=i; } else { b=510 - i; g=255; } my brush=new system.drawing.solid brush (color.from argb (0,g,b ) ); //mygraphicsc.fillpie(mybrush,(pBoxA.Width - pBoxA.Height )/2,0,r,r,120 I * 120/510,85-I/6 ); }for(intI=0; i=510; I//绿色-黄色-红色(if ) I255 ) { g=255; r=i; (else ) g=510-I; r=255; } my brush=new system.drawing.solid brush (color.from argb (r,g,0 ) ); //mygraphicsc.fillpie(mybrush,(pBoxA.Width - pBoxA.Height )/2,0,r,r,240 I * 120/510,85-I/6 ); } } pBoxA.Refresh (;


文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐