@@ -114,13 +114,13 @@ public static Packet MakeEnvSetColor(Byte variable, string color) {
114114 packet . Bytes [ 1 ] = ( byte ) variable ;
115115 if ( color != null ) {
116116 System . Drawing . Color col = System . Drawing . ColorTranslator . FromHtml ( "#" + color . ToUpper ( ) ) ;
117- WriteI16 ( ( short ) col . R , packet . Bytes , 2 ) ;
118- WriteI16 ( ( short ) col . G , packet . Bytes , 4 ) ;
119- WriteI16 ( ( short ) col . B , packet . Bytes , 6 ) ;
117+ WriteI16 ( col . R , packet . Bytes , 2 ) ;
118+ WriteI16 ( col . G , packet . Bytes , 4 ) ;
119+ WriteI16 ( col . B , packet . Bytes , 6 ) ;
120120 } else {
121- WriteI16 ( ( short ) - 1 , packet . Bytes , 2 ) ;
122- WriteI16 ( ( short ) - 1 , packet . Bytes , 4 ) ;
123- WriteI16 ( ( short ) - 1 , packet . Bytes , 6 ) ;
121+ WriteI16 ( - 1 , packet . Bytes , 2 ) ;
122+ WriteI16 ( - 1 , packet . Bytes , 4 ) ;
123+ WriteI16 ( - 1 , packet . Bytes , 6 ) ;
124124 }
125125 return packet ;
126126 }
@@ -143,9 +143,9 @@ public static Packet MakeMakeSelection(byte selectionId, [NotNull] string label,
143143 WriteI16 ( ( short ) ( bounds . YMax + 1 ) , packet . Bytes , 76 ) ;
144144
145145 CustomColor c = Color . ParseHex ( color ) ;
146- WriteI16 ( ( short ) c . R , packet . Bytes , 78 ) ;
147- WriteI16 ( ( short ) c . G , packet . Bytes , 80 ) ;
148- WriteI16 ( ( short ) c . B , packet . Bytes , 82 ) ;
146+ WriteI16 ( c . R , packet . Bytes , 78 ) ;
147+ WriteI16 ( c . G , packet . Bytes , 80 ) ;
148+ WriteI16 ( c . B , packet . Bytes , 82 ) ;
149149 WriteI16 ( opacity , packet . Bytes , 84 ) ;
150150 return packet ;
151151 }
0 commit comments