Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
chặn > Chặn > getHue
Phương thức Block.getHue()
Lấy giá trị màu HSV của một khối. Giá trị rỗng nếu không được thiết lập màu sắc.
Chữ ký:
getHue(): number | null;
Trường hợp trả lại hàng:
số | rỗng
Giá trị Hue (0-360).
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["The `getHue()` method retrieves the hue value of a block, represented as a number between 0 and 360."],["If the block's hue is not explicitly set, the method returns `null`."],["This method is part of the `Block` class in Blockly and is used to access the color information of a block."]]],["The `Block.getHue()` method retrieves the HSV hue value of a block. It returns a number between 0 and 360 representing the hue, or `null` if the hue is not set. This method is used to determine the hue property of a block, and the method signature shows it returns either a numerical value or a null value.\n"]]