# Color:ToVector

- **Ortam:** İstemci, Sunucu
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Color:ToVector
- **Çeviri tarihi:** 2025-09-08

```lua
Vector Color:ToVector()
```

## Açıklama

[Color](https://gmod.tr/wiki/Color) (Renk) değerini bir [Vector](https://gmod.tr/wiki/Vector)'e (Vektör) çevirir ve alfa kanalını kaybeder. Bu işlem aynı zamanda değerleri 0 - 255 aralığından 0 - 1 aralığına ölçekler.

r / 255 -> x
g / 255 -> y
b / 255 -> z

Bu fonksiyon, [Vector:ToColor](https://gmod.tr/wiki/Vector:ToColor) fonksiyonunun tam tersidir.

## Döndürülen Değerler

1. [Vector](https://gmod.tr/wiki/Vector): Oluşturulan [Vector](https://gmod.tr/wiki/Vector)

### Örnek

Oyuncu renklerini ayarlarken kullanışlıdır, çünkü ilgili fonksiyon argüman olarak bir vektör gerektirir.

```lua
Entity( 1 ):SetPlayerColor( Color( 220, 20, 60 ):ToVector() )
```

**Çıktı:** Player1 için oyuncu rengini ayarlar (sadece renklendirilebilir bir oyuncu modeli kullanıyorlarsa çalışır)

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/Color:ToVector
