קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > חסימה > setColour
שיטת Block.setColour()
לשנות את הצבע של בלוק.
Signature:
setColour(colour: number | string): void;
פרמטרים
פרמטר |
סוג |
תיאור |
צבע |
מספר | String (מחרוזת) |
ערך גוון HSV (0 עד 360), מחרוזת #RRGGBB או מחרוזת הפניה להודעה שמצביעה אל אחד משני הערכים האלה. |
החזרות:
ריק
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["The `Block.setColour()` method modifies a block's color. It accepts a single `colour` parameter, which can be a numeric HSV hue value (0-360), an HTML-style hexadecimal color code (`#RRGGBB`), or a string referencing one of those two. The method does not return any value (void). This allows for dynamic color changes within the block interface using different color formats.\n"],null,[]]