Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
blockly > Engelle > setColour
Block.setColour() yöntemi
Bir bloğun rengini değiştirebilirsiniz.
İmza:
setColour(colour: number | string): void;
Parametreler
Parametre |
Tür |
Açıklama |
renk |
sayı | dize |
HSV ton değeri (0 - 360), #RRGGBB dizesi veya bu iki değerden birine işaret eden bir mesaj referans dizesi. |
Şunu döndürür:
geçersiz
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 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,[]]