קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > utils > צבע > hexToRgb
הפונקציה utils.colour.hexToRgb()
ממירה צבע ל-RGB.
Signature:
export declare function hexToRgb(colour: string): number[];
פרמטרים
| פרמטר |
סוג |
תיאור |
| צבע |
מחרוזת |
מחרוזת שמייצגת צבע בכל פורמט צבע ('#ff0000', 'אדום', '0xff000' וכו'). |
החזרות:
מספר[]
ייצוג RGB של הצבע.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["The `hexToRgb` function, part of the `utils.colour` namespace, converts a color string into its RGB representation. It accepts a single parameter, `colour`, which is a string that can represent a color in various formats like '#ff0000', 'red', or '0xff000'. The function then returns an array of numbers, representing the RGB values of the provided color.\n"]]