Skip to content

Commit 2597dea

Browse files
Change color and other fixes
1 parent 5022f82 commit 2597dea

File tree

1 file changed

+85
-33
lines changed

1 file changed

+85
-33
lines changed

src/core/rendering.js

Lines changed: 85 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ p5.prototype.clearDepth = function(depth) {
728728
* final color results from blending the source pixel's color with the canvas
729729
* pixel's color. RGB color values from the source and canvas pixels are
730730
* compared, added, subtracted, multiplied, and divided to create different
731-
* effects. #d41159 values with #d41159 values, greens with greens, and blues with
731+
* effects. Red values with red values, greens with greens, and blues with
732732
* blues.
733733
*
734734
* The parameter, `mode`, sets the blend mode. For example, calling
@@ -805,14 +805,66 @@ p5.prototype.clearDepth = function(depth) {
805805
* strokeWeight(30);
806806
*
807807
* // Draw the first line.
808-
* stroke('#25b7ff');
808+
* stroke('#1a85ff');
809+
* line(25, 25, 75, 75);
810+
*
811+
* // Draw the second line.
812+
* stroke('#d41159');
813+
* line(75, 25, 25, 75);
814+
*
815+
* describe('A faint #1a85ff line and a faint #d41159 line form an X on a gray background. The area where they overlap is #B518B2.');
816+
* }
817+
* </code>
818+
* </div>
819+
*
820+
* <div>
821+
* <code>
822+
* function setup() {
823+
* createCanvas(100, 100);
824+
*
825+
* background(180);
826+
*
827+
* // Set the blend mode.
828+
* blendMode(ADD);
829+
*
830+
* // Style the lines.
831+
* strokeWeight(30);
832+
*
833+
* // Draw the first line.
834+
* stroke('#1a85ff');
835+
* line(25, 25, 75, 75);
836+
*
837+
* // Draw the second line.
838+
* stroke('#d41159');
839+
* line(75, 25, 25, 75);
840+
*
841+
* describe('A faint #1a85ff line and a faint #d41159 line form an X on a gray background. The area where they overlap is #b518b2.');
842+
* }
843+
* </code>
844+
* </div>
845+
*
846+
* <div>
847+
* <code>
848+
* function setup() {
849+
* createCanvas(100, 100);
850+
*
851+
* background(180);
852+
*
853+
* // Set the blend mode.
854+
* blendMode(DARKEST);
855+
*
856+
* // Style the lines.
857+
* strokeWeight(30);
858+
*
859+
* // Draw the first line.
860+
* stroke('#1a85ff');
809861
* line(25, 25, 75, 75);
810862
*
811863
* // Draw the second line.
812-
* stroke('#e6187e');
864+
* stroke('#d41159');
813865
* line(75, 25, 25, 75);
814866
*
815-
* describe('A faint #25b7ff line and a faint #e6187e line form an X on a gray background. The area where they overlap is #b518b2.');
867+
* describe('A faint #1a85ff line and a faint #d41159 line form an X on a gray background. The area where they overlap is #b518b2.');
816868
* }
817869
* </code>
818870
* </div>
@@ -831,14 +883,14 @@ p5.prototype.clearDepth = function(depth) {
831883
* strokeWeight(30);
832884
*
833885
* // Draw the first line.
834-
* stroke('#006fb4');
886+
* stroke('#1a85ff');
835887
* line(25, 25, 75, 75);
836888
*
837889
* // Draw the second line.
838-
* stroke('#a50028');
890+
* stroke('#d41159');
839891
* line(75, 25, 25, 75);
840892
*
841-
* describe('A #006fb4 line and a #a50028 line form an X on a gray background. The area where they overlap is black.');
893+
* describe('A #1a85ff line and a #d41159 line form an X on a gray background. The area where they overlap is black.');
842894
* }
843895
* </code>
844896
* </div>
@@ -857,14 +909,14 @@ p5.prototype.clearDepth = function(depth) {
857909
* strokeWeight(30);
858910
*
859911
* // Draw the first line.
860-
* stroke('#b4b4ff');
912+
* stroke('#1a85ff');
861913
* line(25, 25, 75, 75);
862914
*
863915
* // Draw the second line.
864-
* stroke('#d4b4b4');
916+
* stroke('#d41159');
865917
* line(75, 25, 25, 75);
866918
*
867-
* describe('A faint #b4b4ff line and a faint #d4b4b4 line form an X on a gray background. The area where they overlap is #f4ddff.');
919+
* describe('A faint #1a85ff line and a faint #d41159 line form an X on a gray background. The area where they overlap is #d4b4ff.');
868920
* }
869921
* </code>
870922
* </div>
@@ -883,14 +935,14 @@ p5.prototype.clearDepth = function(depth) {
883935
* strokeWeight(30);
884936
*
885937
* // Draw the first line.
886-
* stroke('#a97d4b');
938+
* stroke('#1a85ff');
887939
* line(25, 25, 75, 75);
888940
*
889941
* // Draw the second line.
890-
* stroke('#a97d4b');
942+
* stroke('#d41159');
891943
* line(75, 25, 25, 75);
892944
*
893-
* describe('A #a97d4b line and a #a97d4b line form an X on a gray background. The area where they overlap is #f4ddff.');
945+
* describe('A #1a85ff line and a #d41159 line form an X on a gray background. The area where they overlap is #647d70.');
894946
* }
895947
* </code>
896948
* </div>
@@ -909,14 +961,14 @@ p5.prototype.clearDepth = function(depth) {
909961
* strokeWeight(30);
910962
*
911963
* // Draw the first line.
912-
* stroke('#125eb4');
964+
* stroke('#1a85ff');
913965
* line(25, 25, 75, 75);
914966
*
915967
* // Draw the second line.
916-
* stroke('#96187e');
968+
* stroke('#d41159');
917969
* line(75, 25, 25, 75);
918970
*
919-
* describe('A #125eb4 line and a #96187e line form an X on a gray background. The area where they overlap is #f4ddff.');
971+
* describe('A #1a85ff line and a #d41159 line form an X on a gray background. The area where they overlap is #0f063f.');
920972
* }
921973
* </code>
922974
* </div>
@@ -935,14 +987,14 @@ p5.prototype.clearDepth = function(depth) {
935987
* strokeWeight(30);
936988
*
937989
* // Draw the first line.
938-
* stroke('#bcdbff');
990+
* stroke('#1a85ff');
939991
* line(25, 25, 75, 75);
940992
*
941993
* // Draw the second line.
942-
* stroke('#f2b9ce');
994+
* stroke('#d41159');
943995
* line(75, 25, 25, 75);
944996
*
945-
* describe('A faint #bcdbff line and a faint #f2b9ce line form an X on a gray background. The area where they overlap is #f4ddff.');
997+
* describe('A faint #1a85ff line and a faint #d41159 line form an X on a gray background. The area where they overlap is #f4ddff.');
946998
* }
947999
* </code>
9481000
* </div>
@@ -1013,14 +1065,14 @@ p5.prototype.clearDepth = function(depth) {
10131065
* strokeWeight(30);
10141066
*
10151067
* // Draw the first line.
1016-
* stroke('#9a2f4b');
1068+
* stroke('#1a85ff');
10171069
* line(25, 25, 75, 75);
10181070
*
10191071
* // Draw the second line.
1020-
* stroke('#20a35b');
1072+
* stroke('#d41159');
10211073
* line(75, 25, 25, 75);
10221074
*
1023-
* describe('A #9a2f4b line and a #20a35b line form an X on a gray background. The area where they overlap is #647e70.');
1075+
* describe('A #1a85ff line and a #d41159 line form an X on a gray background. The area where they overlap is #3a1e0e.');
10241076
* }
10251077
* </code>
10261078
* </div>
@@ -1039,14 +1091,14 @@ p5.prototype.clearDepth = function(depth) {
10391091
* strokeWeight(30);
10401092
*
10411093
* // Draw the first line.
1042-
* stroke('#78b7ff');
1094+
* stroke('#1a85ff');
10431095
* line(25, 25, 75, 75);
10441096
*
10451097
* // Draw the second line.
1046-
* stroke('#e6739d');
1098+
* stroke('#d41159');
10471099
* line(75, 25, 25, 75);
10481100
*
1049-
* describe('A faint #78b7ff line and a faint #e6739d line form an X on a gray background. The area where they overlap is #c879ff.');
1101+
* describe('A faint #1a85ff line and a faint #d41159 line form an X on a gray background. The area where they overlap is #c879ff.');
10501102
* }
10511103
* </code>
10521104
* </div>
@@ -1065,14 +1117,14 @@ p5.prototype.clearDepth = function(depth) {
10651117
* strokeWeight(30);
10661118
*
10671119
* // Draw the first line.
1068-
* stroke('#8ab6d6');
1120+
* stroke('#1a85ff');
10691121
* line(25, 25, 75, 75);
10701122
*
10711123
* // Draw the second line.
1072-
* stroke('#cb86a4');
1124+
* stroke('#d41159');
10731125
* line(75, 25, 25, 75);
10741126
*
1075-
* describe('A faint #8ab6d6 line and a faint #cb86a4 line form an X on a gray background. The area where they overlap is #aa89cb.');
1127+
* describe('A faint #1a85ff line and a faint #d41159 line form an X on a gray background. The area where they overlap is #ab87cc.');
10761128
* }
10771129
* </code>
10781130
* </div>
@@ -1091,14 +1143,14 @@ p5.prototype.clearDepth = function(depth) {
10911143
* strokeWeight(30);
10921144
*
10931145
* // Draw the first line.
1094-
* stroke('#c8ffff');
1146+
* stroke('#1a85ff');
10951147
* line(25, 25, 75, 75);
10961148
*
10971149
* // Draw the second line.
1098-
* stroke('#ffc1ff');
1150+
* stroke('#d41159');
10991151
* line(75, 25, 25, 75);
11001152
*
1101-
* describe('A faint #c8ffff line and a faint #ffc1ff line form an X on a gray background. The area where they overlap is white.');
1153+
* describe('A faint #1a85ff line and a faint #d41159 line form an X on a gray background. The area where they overlap is white.');
11021154
* }
11031155
* </code>
11041156
* </div>
@@ -1118,11 +1170,11 @@ p5.prototype.clearDepth = function(depth) {
11181170
* // Style the lines.
11191171
* strokeWeight(30);
11201172
*
1121-
* // Draw the #1a85ff line.
1173+
* // Draw the blue line.
11221174
* stroke('blue');
11231175
* line(-25, -25, 25, 25);
11241176
*
1125-
* // Draw the #d41159 line.
1177+
* // Draw the red line.
11261178
* stroke('red');
11271179
* line(25, -25, -25, 25);
11281180
*

0 commit comments

Comments
 (0)