# IMaterial:GetColor

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

```lua
Color IMaterial:GetColor( number x, number y )
```

## Açıklama

`$basetexture`'ün belirtilen pikselinin rengini döndürür, yalnızca PNG dosyalarından oluşturulan materyaller için çalışır.

Temel olarak [IMaterial:GetTexture](https://gmod.tr/wiki/IMaterial:GetTexture)`( "$basetexture" )` üzerinde kullanılan [ITexture:GetColor](https://gmod.tr/wiki/ITexture:GetColor) ile aynıdır.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **x**: X koordinatı.
2. [number](https://gmod.tr/wiki/number) **y**: Y koordinatı.

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

1. [Color](https://gmod.tr/wiki/Color): Pikselin rengini bir [Color](https://gmod.tr/wiki/Color) olarak döndürür.

### Örnek

Aynı işlevsellik.

```lua
local m = Material( "gui/colors_dark.png" )
local t = m:GetTexture("$basetexture")

PrintTable( t:GetColor( 5, 5 ) )
PrintTable( m:GetColor( 5, 5 ) )
```

**Çıktı:** Her iki çıktı da aynı rengi döndürecektir, test sırasında bu renk RGBA - 255, 244, 242, 255 idi.

- [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/IMaterial:GetColor
